mistral-hello-world

Featured

Create a minimal working Mistral AI chat completion example. Use when starting a new Mistral integration, testing your setup, or learning basic Mistral API patterns. Trigger with phrases like "mistral hello world", "mistral example", "mistral quick start", "simple mistral code", "mistral chat".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Mistral AI Hello World ## Overview Minimal working examples demonstrating Mistral AI chat completions, streaming, multi-turn conversation, and JSON mode. Uses the official `@mistralai/mistralai` TypeScript SDK and `mistralai` Python SDK. ## Prerequisites - Completed `mistral-install-auth` setup - Valid `MISTRAL_API_KEY` environment variable set - Node.js 18+ or Python 3.9+ ## Instructions ### Step 1: Basic Chat Completion **TypeScript (hello-mistral.ts)** ```typescript import { Mistral } from '@mistralai/mistralai'; const client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY }); async function main() { const response = await client.chat.complete({ model: 'mistral-small-latest', messages: [ { role: 'user', content: 'Say "Hello, World!" in a creative way.' }, ], }); console.log(response.choices?.[0]?.message?.content); console.log('Tokens used:', response.usage); } main().catch(console.error); ``` **Python (hello_mistral.py)** ```python import os from mistralai import Mistral client = Mistral(api_key=os.environ["MISTRAL_API_KEY"]) response = client.chat.complete( model="mistral-small-latest", messages=[ {"role": "user", "content": "Say 'Hello, World!' in a creative way."} ], ) print(response.choices[0].message.content) print(f"Tokens: {response.usage}") ``` ### Step 2: Run the Example ```bash # TypeScript npx tsx hello-mistral.ts # Python python hello_mistral.py ``` ### Step 3: Streaming Response Streaming de...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

mistral-core-workflow-a

Execute Mistral AI chat completions with streaming, multi-turn, and guardrails. Use when implementing chat interfaces, building conversational AI, or integrating Mistral for text generation. Trigger with phrases like "mistral chat", "mistral completion", "mistral streaming", "mistral conversation", "mistral guardrails".

2,266 Updated today
jeremylongshore
AI & Automation Featured

mistral-install-auth

Install and configure the Mistral AI SDK with authentication. Use when setting up a new Mistral integration, configuring API keys, or initializing Mistral AI in your project. Trigger with phrases like "install mistral", "setup mistral", "mistral auth", "configure mistral API key".

2,266 Updated today
jeremylongshore
AI & Automation Featured

mistral-sdk-patterns

Apply production-ready Mistral AI SDK patterns for TypeScript and Python. Use when implementing Mistral integrations, refactoring SDK usage, or establishing team coding standards for Mistral AI. Trigger with phrases like "mistral SDK patterns", "mistral best practices", "mistral code patterns", "idiomatic mistral".

2,266 Updated today
jeremylongshore
AI & Automation Featured

mistral-common-errors

Diagnose and fix Mistral AI common errors and exceptions. Use when encountering Mistral errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "mistral error", "fix mistral", "mistral not working", "debug mistral".

2,266 Updated today
jeremylongshore
AI & Automation Featured

mistral-webhooks-events

Implement Mistral AI async patterns, batch API, agents, and event-driven workflows. Use when building async workflows, using the Agents API, batch inference, or handling long-running Mistral AI operations. Trigger with phrases like "mistral events", "mistral async", "mistral agents", "mistral batch", "mistral queue", "mistral background jobs".

2,266 Updated today
jeremylongshore