File size: 1,368 Bytes
631929d
0aba0d2
 
 
 
631929d
0aba0d2
 
631929d
 
 
0aba0d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
title: Sixfinger-2B Backend API
emoji: 🤖
colorFrom: blue
colorTo: purple
sdk: docker
sdk_version: "20.10.7"
app_port: 7860
pinned: false
---

# 🤖 Sixfinger-2B Backend API

Türkçe dil modeli (Sixfinger-2B) API servisi.

## 🚀 Endpoints

- `POST /api/chat` - Normal chat (JSON response)
- `POST /api/chat/stream` - Streaming chat (Server-Sent Events)
- `GET /health` - Health check
- `GET /api/stats` - API statistics

## 📖 Usage

### Normal Chat
```bash
curl -X POST https://yourusername-sixfinger-backend.hf.space/api/chat \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Merhaba!",
    "max_tokens": 100
  }'
Streaming Chat
Bash

curl -X POST https://yourusername-sixfinger-backend.hf.space/api/chat/stream \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Python nedir?"}' \
  --no-buffer
🔧 Parameters
prompt (required): User message
max_tokens (optional): Maximum tokens (default: 300, max: 2000)
temperature (optional): Creativity (0.1-2.0, default: 0.8)
top_p (optional): Nucleus sampling (0.1-1.0, default: 0.9)
repetition_penalty (optional): Repetition penalty (1.0-2.0, default: 1.15)
📊 Model
Name: Sixfinger-2B
Size: 2 Billion parameters
Language: Turkish (Istanbul slang)
Quantization: 4-bit (NF4)
🔗 Links
Model: https://huggingface.co/yourusername/sixfinger-2b
Dashboard: https://sfapi.pythonanywhere.com