,
model: 'Claude 3.7 Sonnet',
modelIcon: '/storage/bot/llm/claude.png',
modelProvider: 'Anthropic',
prompt: 'یک تابع پایتون بنویس که اتصال پایگاه داده را با کش Redis و مدیریت خطای خودکار انجام دهد.',
thought: 'تحلیل ساختار ناهمگام (Async)، مدیریت Connection Pool و کش دو لایه...',
response: `\`\`\`python
from fastapi import FastAPI, Depends
import redis.asyncio as aioredis
async def get_cached_ai_response(prompt_hash: str):
client = aioredis.from_url("redis://localhost:6379")
cached = await client.get(prompt_hash)
if cached:
return {"source": "cache", "data": cached.decode()}
return None
\`\`\``,
stats: { speed: '۳۲۰ توکن/ثانیه', tokens: '۶۸۰ توکن', latency: '۰.۱۹s' }
},
{
id: 'reasoning',
category: 'استدلال عمیق و منطق',
icon:
{currentPreset.prompt}