Przejdź do treści
Biblioteka skilli
AI i agenci · Integracja z narzędziem

mistral

/mistral

Pomaga pracować z modelami Mistral Large, Small, Codestral i Pixtral, w tym z function calling i lokalnym wdrożeniem przez Ollama lub vLLM.

Repozytorium
Agent-Skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
01.10.2026

Ocena i bezpieczeństwo

98/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena13 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 01.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pomaga pracować z modelami Mistral Large, Small, Codestral i Pixtral, w tym z function calling i lokalnym wdrożeniem przez Ollama lub vLLM.

Oryginalny opis (EN)

Expert Mistral AI assistance covering Mistral Large/Small, Codestral, Pixtral, function calling, and local deployment via Ollama/vLLM. Use when deploying high-efficiency open foundation models.

Jak działa

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Sekcje z nagłówków SKILL.md, w oryginale · 167 linii, 558 słów
Podgląd SKILL.md
---
name: mistral
description: Expert Mistral AI assistance covering Mistral Large/Small, Codestral, Pixtral, function calling, and local deployment via Ollama/vLLM. Use when deploying high-efficiency open foundation models.
---

# Mistral

Mistral AI focuses on **efficiency** and **coding** capabilities. Their "Mixture of Experts" (MoE) architecture (Mixtral) changed the game.

## When to Use

- **High-Performance European & Multilingual LLMs**: Mistral Large, Mistral NeMo, and Codestral for code intelligence and multilingual reasoning.
- **Efficient Function Calling & JSON Enforcement**: Executing structured agentic workflows with low latency.
- **On-Premise & Open-Weights Self-Hosting**: Deploying open weights (Mistral-7B, Mixtral 8x7B/8x22B) with vLLM or Ollama.
- **High-Speed Code Completion**: Integrating Codestral into IDEs with Fill-in-the-Middle (FIM) capabilities.

## Quick Start

```python
from mistralai import Mistral

client = Mistral(api_key="your-mistral-api-key")

response = client.chat.complete(
    model="mistral-large-latest",
    messages=[{"role": "user", "content": "Explain Mixture of Experts (MoE) in two sentences."}]
)

print(response.choices[0].message.content)
```

## Core Concepts

### Chat Completion with Mistral Python Client

Calling Mistral Large with structured configuration:

```python
import os
from mistralai import Mistral

client = Mistral(api_key=os.environ.get("MISTRAL_API_KEY"))

response = client.chat.complete(
    model="mistral-large-latest",
    messages=[
        {"role": "system", "content": "You are an expert security engineer."},
        {"role": "user", "content": "Analyze the security implications of using JWT in local storage."}
    ],
    temperature=0.2,
    max_tokens=1024
)

print(response.choices[0].message.content)
```

### Tool Use & Function Calling

Binding tools to Mistral for multi-turn agent execution:

```python
import json
from mistralai import Mistral

client = Mistral()

tools = [
    {
        "type": "function",
        "function": {
            "name": "lookup_dns_records",
            "description": "Query DNS records for a given domain name.",
            "parameters": {
                "type": "object",
                "properties": {
                    "domain": {"type": "string", "description": "The domain name, e.g. example.com"},
                    "record_type": {"type": "string", "enum": ["A", "AAAA", "MX", "TXT"]}
                },
                "required": ["domain", "record_type"]
            }
        }
    }
]

response = client.chat.complete(
    model="mistral-large-latest",
    messages=[{"role": "user", "content": "Check the MX records for github.com"}],
    tools=tools,
    tool_choice="auto"
)

message = response.choices[0].message
if message.tool_calls:
    for tool_call in message.tool_calls:
        print(f"Tool Requested: {tool_call.function.name}")
        print(f"Arguments: {tool_call.function.arguments}")
```

### Fill-in-the-Middle (FIM) with Codestral

Completing code between prefix and suffix markers:

```python
from mistralai import Mistral

client = Mistral()

prefix = '''def calculate_tax(income: float) -> float:
    # Validate input
    if income < 0:
        raise ValueError('Income cannot be negative')
'''
suffix = '''    return tax_amount
'''

response = client.fim.complete(
    model="codestral-latest",
    prompt=prefix,
    suffix=suffix,
    temperature=0.1
)

print("Infilled Code:\n", response.choices[0].message.content)
```

## Common Patterns

### Code Generation with Codestral FIM (Fill-in-the-Middle)

**Problem**: Generating code completions that seamlessly fit between existing prefix and suffix code snippets.

**Solution**:
Use Codestral's native FIM endpoint:

```python
response = client.fim.complete(
    model="codestral-latest",
    prompt="def binary_search(arr, target):\n    left, right = 0, len(arr) - 1\n",
    suffix="\n    return -1"
)

print(response.choices[0].message.content)
```

## Best Practices

**Do**:

- Target `codestral-latest` for coding tasks and Fill-in-the-Middle (FIM) in-editor completions.
- Use `response_format={"type": "json_object"}` when machine-readable JSON is strictly required.
- Set `temperature=0.1` for code generation and factual extraction tasks.
- Leverage Mixtral Mixture-of-Experts (MoE) architectures for high throughput with reduced active parameter counts.

**Don't**:

- Provide unstructured tool descriptions; define strict JSON schemas with clear parameter types.
- Hardcode `MISTRAL_API_KEY` in scripts; load from environment variables.
- Use large general models when specialized compact models like `ministral-8b` or `mistral-nemo` suffice.

## Troubleshooting

| Error                               | Cause                                              | Solution                                                        |
| :---------------------------------- | :------------------------------------------------- | :-------------------------------------------------------------- |
| `MistralAPIError: 401 Unauthorized` | Invalid or unset API key.                          | Pass valid key via `api_key` or export `MISTRAL_API_KEY`.       |
| `429 Too Many Requests`             | Monthly quota or concurrent request limit reached. | Monitor usage in Mistral Console or self-host weights via vLLM. |
| `Model not found error`             | Deprecated model tag used in API call.             | Use active aliases: `mistral-large-latest`, `codestral-latest`. |

## References

- [Mistral AI Documentation](https://docs.mistral.ai/)

Wersje

W bazie nie ma innych skilli o nazwie mistral.

Migawka bazy z 28.10.2026 · wersja paczki 37c7486f11f5 (skrót SHA-256 całej paczki)

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 98mistral-api
    Pomaga korzystać z API Mistral AI: czat, streaming, function calling, wyjście JSON, Codestral fill-in-the-middle, embeddingi i inferencja w regionie UE.
  • 100ollama
    Pomaga w lokalnym uruchamianiu modeli LLM w Ollama: dostosowanie Modelfile, integracja przez REST API, kwantyzacje oraz modele Llama, Mistral i DeepSeek na CPU i GPU.
  • 100mistral-core-workflow-b
    Buduje embeddingi, wyszukiwanie i pętle wywołań funkcji w Mistral z izolacją tenantów i wykonywaniem po stronie aplikacji, np. dla RAG.
  • 100mistral-core-workflow-a
    Wdraża nadzorowane zapytania Mistral do czatu, strumieniowania i ustrukturyzowanych wyników, z walidacją schematu i dowodami dotyczącymi modelu.
  • 100mistral-router
    Dobiera dostępne narzędzie i model Mistral do ekstrakcji dokumentów, czatu, kodu, widzenia, audio lub wdrożonych przepływów oraz pomaga w kierowaniu zadań.
  • 100mistral-webhooks
    Odbiera i weryfikuje webhooki agentów głosowych Mistral AI Studio, w tym podpis x-mistral-signature oraz zdarzenia call_started, call_ended i call_failed.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.