Chat logo

Chat

Organization
sarvamai
chat

Write correct Sarvam AI chat-completion code (Sarvam-105B, Sarvam-30B) — OpenAI-compatible API, streaming, reasoning mode, and the content=None gotcha. Use this skill when building chatbots, Q&A, agents, or Indic LLM features in Python or JS/TS. For a live completion in chat via MCP, use sarvam-mcp instead.

Overview

Publishersarvamai
Repositoryskills
Skill namechat
Stars
72
Forks
24
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by sarvamai on GitHub. Read the source before you install it.

Installation

Install the Chat AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/sarvamai/skills/tree/main/chat
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sarvamai/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/chat .claude/skills/chat
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Chat in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Chat on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Chat is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Chat Completions — Sarvam AI

Live in-chat completion → sarvam-mcp (sarvam_tools_llm_complete). This skill = SDK code.

[!IMPORTANT] Auth: api-subscription-key header — NOT Authorization: Bearer. Base URL: https://api.sarvam.ai/v1

Models

ModelContextBest For
sarvam-105b128KComplex reasoning, coding, agentic workflows
sarvam-105b-conversations32KReal-time chat, voice agents, conversational AI

sarvam-30b is deprecated — migrate to sarvam-105b for complex tasks or sarvam-105b-conversations for real-time/voice (the model built to fill sarvam-30b's old slot). The fixed-context variants (sarvam-105b-32k, sarvam-30b-16k) are retired — base models serve their full context window directly.

Also available (beta, on /v2/chat/completions): open-weight models glm5.3 (1M context, reasoning), deepseekv4-flash (1M context, reasoning), gemma4 (131K context, text+image, no reasoning). Requires beta access on your API key. Called via client.chat.completions_v2(...) in Python — not .completions(). Still under beta and expected to GA soon — see Full Docs for details.

Quick Start (Python)

python
from sarvamai import SarvamAI
client = SarvamAI()

response = client.chat.completions(
    model="sarvam-105b-conversations",
    messages=[{"role": "user", "content": "भारत की राजधानी क्या है?"}]
)
print(response.choices[0].message.content)

Streaming (Python)

python
for chunk in client.chat.completions(
    model="sarvam-105b-conversations",
    messages=[{"role": "user", "content": "Write a poem about India"}],
    stream=True
):
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Quick Start (JavaScript/TypeScript)

typescript
import { SarvamAIClient } from "sarvamai";

const client = new SarvamAIClient({ apiSubscriptionKey: "YOUR_SARVAM_API_KEY" });

const response = await client.chat.completions({
    model: "sarvam-105b-conversations",
    messages: [{ role: "user", content: "भारत की राजधानी क्या है?" }]
});
console.log(response.choices[0].message.content);

OpenAI-Compatible (both languages)

python
from openai import OpenAI
client = OpenAI(api_key="your-key", base_url="https://api.sarvam.ai/v1")
response = client.chat.completions.create(model="sarvam-105b-conversations", messages=[...])

Gotchas

GotchaDetail
SDK methodPython: client.chat.completions(...), JS: client.chat.completions({...}) — no .create() in either. OpenAI SDK uses .create() as usual.
JS constructornew SarvamAIClient({ apiSubscriptionKey: "..." }) — NOT SarvamAI(). Key is passed explicitly.
content can be NoneModels produce reasoning_content before content. If max_tokens is too low, reasoning consumes the budget, finish_reason is "length", and content is None. Omit max_tokens, set 500+, or disable reasoning with reasoning_effort=None. Check reasoning_content as fallback. Verified live: this is real and a little flaky — the same short prompt at max_tokens=500 returned content=None once and content="OK" on retry, with reasoning eating 251 of the 500 tokens that time. Don't treat 500 as a guarantee; check reasoning_content/finish_reason regardless.
reasoning_effortThinking is on by default at "low". Values: "low"|"medium"|"high", or None to disable reasoning entirely. NOT thinking=True. Reasoning tokens count toward completion tokens and billing.
sarvam-30b now hard-errors, not just "deprecated"Verified live: calling it returns 400 invalid_request_error — "Model 'sarvam-30b' has been deprecated. Please use one of the available models instead: sarvam-105b, sarvam-105b-conversations." It's not a soft warning; existing code on sarvam-30b is already broken. Migrate to sarvam-105b or sarvam-105b-conversations.
Open-weight models: Python-only for nowglm5.3 / gemma4 / deepseekv4-flash go through client.chat.completions_v2(...) on /v2/chat/completions in Python (verified working, all three, with a beta-enabled key). Verified live: the installed JS SDK (sarvamai@1.1.10) has no completionsV2 method at all (client.chat.completionsV2 is not a function) — only .completions() exists in JS right now. Don't generate JS code calling completionsV2 until the JS SDK ships it; check npm ls sarvamai / the changelog first.

Full Docs

Fetch detailed parameters, tool calling, streaming, and examples from:

Frequently asked questions

What does the Chat AI skill do?

Write correct Sarvam AI chat-completion code (Sarvam-105B, Sarvam-30B) — OpenAI-compatible API, streaming, reasoning mode, and the content=None gotcha. Use this skill when building chatbots, Q&A, agents, or Indic LLM features in Python or JS/TS. For a live completion in chat via MCP, use sarvam-mcp instead.

Why use Chat on TypingMind?

Because you install it once and use it with any model. Chat is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Chat in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/sarvamai/skills/tree/main/chat. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Chat?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Chat?

As many as you like. As long as a model supports skills, you can use Chat with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Chat AI skill free?

Yes. It is published on GitHub by sarvamai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇