Mistral
Mistral Small
Genel amaçlı sohbet ve otomasyon için
Input 300 kredi/1M token
Output 1.200 kredi/1M token
Hakkında
Mistral Small (Azure), Mistral AI'nin hafif ve hızlı modelinin Azure üzerinde barındırılan versiyonudur. 24B parametre, 128K bağlam penceresi ve araç kullanımı desteği sunar. Apache 2.0 lisansı ile açık kaynaktır. Parel API üzerinden Azure altyapısının güvenilirliği ile genel amaçlı sohbet ve analiz projelerinize entegre edilebilir.
Kullanım Alanları
- › Chatbot ve müşteri destek otomasyonu
- › İçerik üretimi ve metin özeti
- › RAG (Retrieval-Augmented Generation) sistemleri
- Provider
- Mistral
- Tür
- LLM
- Context
- 131K token
- Model ID
- mistral-small-azure
- Input Fiyat
- 300 kredi/1M token
- Output Fiyat
- 1.200 kredi/1M token
Benzer Modeller
OpenAI SDK ile dakikalar içinde entegre edin.
Authentication #
API anahtarınızı ortam değişkeni olarak tanımlayın.
import os
os.environ["OPENAI_API_KEY"] = "pk-..."Kurulum #
OpenAI SDK'yi yükleyin.
pip install openaiChat Completions #
Temel sohbet tamamlama isteği.
from openai import OpenAI
client = OpenAI(
base_url="https://api.parel.cloud/v1",
api_key="pk-...",
)
response = client.chat.completions.create(
model="mistral-small-azure",
messages=[
{"role": "user", "content": "Merhaba!"}
],
)
print(response.choices[0].message.content)Streaming #
Yanıtları token token akın halinde alın.
from openai import OpenAI
client = OpenAI(
base_url="https://api.parel.cloud/v1",
api_key="pk-...",
)
stream = client.chat.completions.create(
model="mistral-small-azure",
messages=[
{"role": "user", "content": "Türkiye'nin başkenti neresidir?"}
],
stream=True,
)
for chunk in stream:
content = chunk.choices[0].delta.content
if content:
print(content, end="", flush=True)System Prompt #
Modelin davranisini system mesajiyla yonlendirin.
from openai import OpenAI
client = OpenAI(
base_url="https://api.parel.cloud/v1",
api_key="pk-...",
)
response = client.chat.completions.create(
model="mistral-small-azure",
messages=[
{
"role": "system",
"content": "Sen yardimci bir Turkce asistansin. Kisa ve net cevaplar ver."
},
{
"role": "user",
"content": "KVKK nedir?"
}
],
)
print(response.choices[0].message.content)Parametreler #
Yanıt kalitesini ve çeşitliliğini ayarlayın.
from openai import OpenAI
client = OpenAI(
base_url="https://api.parel.cloud/v1",
api_key="pk-...",
)
response = client.chat.completions.create(
model="mistral-small-azure",
messages=[
{"role": "user", "content": "Yaratici bir hikaye yaz."}
],
temperature=0.9, # 0-2: dusuk = deterministik, yuksek = yaratici
max_tokens=2048, # maksimum cikti token sayisi
top_p=0.95, # nucleus sampling esigi
)
print(response.choices[0].message.content)Kayıt olun, API anahtarınızı alın.