File size: 7,720 Bytes
7edb85f
 
 
 
 
 
 
 
 
 
 
b064d5f
7edb85f
b064d5f
7edb85f
b064d5f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7edb85f
 
 
b064d5f
 
 
 
 
 
 
 
 
 
 
7edb85f
b064d5f
 
 
 
 
 
 
 
 
7edb85f
 
 
b064d5f
 
7edb85f
b064d5f
7edb85f
 
 
 
 
 
 
 
 
b064d5f
 
 
7edb85f
 
b064d5f
7edb85f
 
b064d5f
 
 
 
 
 
 
 
7edb85f
 
b064d5f
 
 
7edb85f
 
 
 
 
 
 
b064d5f
 
 
 
 
 
 
 
 
 
 
 
7edb85f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b064d5f
7edb85f
b064d5f
8fdb34a
b064d5f
7edb85f
 
 
 
 
 
 
 
 
 
b064d5f
 
 
 
 
 
 
 
 
 
 
 
 
 
7edb85f
 
 
 
b064d5f
7edb85f
b064d5f
7edb85f
 
 
 
b064d5f
7edb85f
 
 
 
 
 
 
b064d5f
7edb85f
b064d5f
7edb85f
b064d5f
7edb85f
b064d5f
 
 
 
 
 
 
7edb85f
 
b064d5f
 
 
 
 
 
 
 
7edb85f
 
 
b064d5f
7edb85f
b064d5f
7edb85f
b064d5f
 
 
 
7edb85f
 
b064d5f
7edb85f
 
 
 
 
b064d5f
 
 
 
 
 
 
 
7edb85f
 
b064d5f
 
 
 
 
 
 
 
 
7edb85f
b064d5f
 
7edb85f
b064d5f
7edb85f
b064d5f
 
 
 
 
 
7edb85f
 
 
b064d5f
 
 
7edb85f
b064d5f
 
7edb85f
 
 
 
b064d5f
7edb85f
b064d5f
7edb85f
 
 
 
 
 
 
 
 
 
 
b064d5f
7edb85f
 
 
 
 
 
 
 
 
 
 
 
 
b064d5f
 
 
 
 
7edb85f
 
 
b064d5f
7edb85f
b064d5f
 
 
 
 
 
 
 
7edb85f
 
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
---
title: AI Developer Assistant - Miço
emoji: 🤖
colorFrom: indigo
colorTo: purple
sdk: gradio
app_file: app.py
pinned: false
license: mit
python_version: "3.11"
---
<div align="center">

# 🤖 AI Developer Assistant - Miço

Kullanıcı isteğini analiz eden, gerekli araçları otomatik olarak seçen ve elde edilen sonuçları tek bir kapsamlı cevap halinde sunan **Agentic AI** tabanlı geliştirici asistanı.

<br>

[![Live Demo](https://img.shields.io/badge/🤗%20Hugging%20Face-Live%20Demo-yellow?style=for-the-badge)](https://huggingface.co/spaces/sedayzc/developer-asisstant-tool-call)
[![GitHub](https://img.shields.io/badge/GitHub-Repository-black?style=for-the-badge&logo=github)](https://github.com/ssedayzc/developer-asisstant-tool-call)

<br>

![Python](https://img.shields.io/badge/Python-3.11-blue?style=flat-square&logo=python)
![Gradio](https://img.shields.io/badge/Gradio-6.x-orange?style=flat-square)
![Hugging Face](https://img.shields.io/badge/HuggingFace-Inference%20Providers-yellow?style=flat-square)
![Pydantic](https://img.shields.io/badge/Pydantic-v2-green?style=flat-square)
![License](https://img.shields.io/badge/License-MIT-success?style=flat-square)

</div>

---

# 📖 Proje Hakkında

**AI Developer Assistant - Miço**, geliştiricilerin yazılım geliştirme süreçlerini hızlandırmak amacıyla geliştirilmiş **LLM tabanlı ajan (Agentic AI)** mimarisine sahip bir yardımcı uygulamadır.

Uygulama;

- Kullanıcı isteğini analiz eder.
- Kullanılması gereken araçları otomatik olarak belirler.
- İlgili araçları çalıştırır.
- Araçlardan elde edilen bilgileri bir araya getirir.
- Sonuçları tek bir anlamlı cevap halinde kullanıcıya sunar.

Projede **Planner → Executor → Responder** mimarisi kullanılmaktadır.

---

# ✨ Özellikler

- 🧠 LLM tabanlı Planner
- 🔧 Otomatik Tool Calling
- 📦 Pydantic ile Structured Output
- 📚 PyPI paket araştırması
- ⭐ GitHub repository araştırması
- 💬 Stack Overflow soru araştırması
- 🔄 Çoklu Tool (Multi Tool) desteği
- 🧩 Modüler Agent Mimarisi
- 🎨 Gradio tabanlı kullanıcı arayüzü
- ☁️ Hugging Face Spaces desteği

---

# 🏗️ Sistem Mimarisi

```text
                    Kullanıcı


              ┌──────────────────┐
              │   Planner LLM    │
              └──────────────────┘


             Structured Tool Plan


              ┌──────────────────┐
              │  Tool Executor   │
              └──────────────────┘
                 │      │      │
                 ▼      ▼      ▼
              PyPI   GitHub   StackOverflow
                 │      │      │
                 └──────┴──────┘


              ┌──────────────────┐
              │  Responder LLM   │
              └──────────────────┘


                  Nihai Cevap
```

---

# ⚙️ Çalışma Akışı

1. Kullanıcı isteği alınır.
2. Planner LLM isteği analiz eder.
3. Structured Tool Plan oluşturulur.
4. Executor gerekli araçları çalıştırır.
5. Araçlardan gelen sonuçlar toplanır.
6. Responder LLM tüm bilgileri sentezler.
7. Kullanıcıya nihai cevap sunulur.

---

# 📂 Proje Yapısı

```text
developer-assistant-tool-call/

├── llm/
│   ├── client.py
│   ├── planner.py
│   ├── responder.py
│   └── schemas.py

├── tools/
│   ├── github_tool.py
│   ├── pypi_tool.py
│   ├── stackoverflow_tool.py
│   └── registry.py

├── models/
│   ├── tool_models.py
│   └── trace_models.py

├── prompts/
│   ├── planner_prompt.txt
│   └── responder_prompt.txt

├── utils/
│   └── logger.py

├── executor.py
├── agent.py
├── app.py
├── config.py
├── requirements.txt
└── README.md
```

---

# 🛠️ Kullanılan Teknolojiler

- Python 3.11
- Hugging Face Inference Providers
- Qwen
- Gradio
- Pydantic
- Requests
- Rich
- GitHub REST API
- PyPI API
- Stack Exchange API

---

# 🚀 Canlı Demo

Kurulum yapmadan uygulamayı deneyebilirsiniz.

<div align="center">

[![Open in Hugging Face](https://img.shields.io/badge/🚀%20Open%20Demo-Hugging%20Face-yellow?style=for-the-badge)](https://huggingface.co/spaces/sedayzc/developer-asisstant-tool-call)
[![GitHub](https://img.shields.io/badge/GitHub-Repository-black?style=for-the-badge&logo=github)](https://github.com/ssedayzc/developer-asisstant-tool-call)

</div>

---

# 💻 Lokalde Çalıştırma

## 1. Repoyu klonlayın

```bash
git clone https://github.com/ssedayzc/developer-asisstant-tool-call.git

cd developer-asisstant-tool-call
```

---

## 2. Gerekli paketleri yükleyin

```bash
pip install -r requirements.txt
```

---

## 3. Hugging Face Access Token oluşturun

Bu proje **Hugging Face Inference Providers** üzerinden çalışmaktadır.

Bu nedenle kendi Hugging Face hesabınıza ait bir **Access Token** oluşturmanız gerekmektedir.

1. Hugging Face hesabınıza giriş yapın.

2. **Settings → Access Tokens** sayfasına gidin.

3. **Fine-grained Token** oluşturun.

4. Token oluştururken aşağıdaki izni aktif hale getirin.

```
Make calls to Inference Providers
```

> [!IMPORTANT]
>
> Bu izin verilmediği takdirde uygulama aşağıdaki hatayı verecektir.
>
> **403 Forbidden: This authentication method does not have sufficient permissions to call Inference Providers**

---

## 4. `.env` dosyasını oluşturun

Proje dizininde aşağıdaki içerikte bir **.env** dosyası oluşturun.

```env
HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
HF_MODEL=Qwen/Qwen2.5-7B-Instruct
HF_PROVIDER=together
---

## 5. Uygulamayı çalıştırın

```bash
python app.py
```

# 💡 Örnek Kullanım

### 📦 PyPI

```text
FastAPI paketinin güncel PyPI bilgilerini göster.
```

---

### ⭐ GitHub

```text
openai/openai-python repository'sini incele.
```

---

### 💬 Stack Overflow

```text
Python'da TypeError: 'list' object is not callable hatası alıyorum.

Benzer Stack Overflow sorularını bul.
```

---

### 🔄 Çoklu Tool Kullanımı

```text
FastAPI ve Flask frameworklerini karşılaştır.

• Güncel PyPI sürümlerini getir.

• GitHub repositorylerini incele.

• Stack Overflow üzerindeki popüler soruları araştır.

• Sonuçları özetle.
```

---

# 📸 Uygulama Görselleri

## Ana Arayüz

![Uygulama](images/app.png)

---

## Planner Analizi

![Planner](images/planner.png)

---

## Tool Planı

![Tools](images/tools.png)

---

## Nihai Cevap

![Final Answer](images/final_answer.png)

---

# 🔍 Desteklenen Araçlar

| Araç | Açıklama |
|------|----------|
| 📦 PyPI | Paket bilgileri, güncel sürüm, lisans ve Python gereksinimleri |
| ⭐ GitHub | Repository arama, yıldız sayısı, fork, lisans ve açıklama |
| 💬 Stack Overflow | Benzer teknik sorular ve popüler çözümler |

---

# ⭐ Öne Çıkan Özellikler

- Agentic AI Mimarisi
- Planner / Executor / Responder Pipeline
- Tool Calling
- Structured Output
- Modüler Tool Registry
- Çok adımlı karar verme mekanizması
- Hugging Face Spaces üzerinde çalışabilme
- Kolay genişletilebilir yapı

---