Skip to content

Commit 971fa7d

Browse files
committed
resolve: merge conflicts with main branch
- Resolve all merge conflicts by keeping release/v3.0.2 changes - Maintain v3.0.2 features and improvements - Keep updated .gitignore with Whisper models and TODO files - Preserve all v3.0.2 breaking changes and documentation updates - Ready for merge to main branch
2 parents 9142db1 + 6e594f5 commit 971fa7d

File tree

4 files changed

+529
-0
lines changed

4 files changed

+529
-0
lines changed

TODO.md

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# SmartRAG TODO List
2+
3+
## 🚀 High Priority
4+
5+
### Parametreli Sorgu Sistemi (Parameterized Query System)
6+
**Branch:** `feature/parameterized-queries`
7+
8+
**Neden gerekli:**
9+
- SQL Injection koruması (güvenlik)
10+
- Query plan caching (performans)
11+
- Tip güvenliği (type safety)
12+
- Production-ready özellik
13+
14+
**Şu anki durum:**
15+
- ✅ AI literal values kullanıyor (çalışıyor ama ideal değil)
16+
-@param, :param, ? syntax yasaklandı (geçici çözüm)
17+
- ✅ Test success rate: %72.7
18+
19+
**Implementation Plan:**
20+
21+
1. **Model Class Oluştur**
22+
```csharp
23+
public class SqlQueryWithParameters
24+
{
25+
public string Sql { get; set; }
26+
public Dictionary<string, object> Parameters { get; set; }
27+
}
28+
```
29+
30+
2. **AI Prompt Değiştir**
31+
- AI JSON output üretsin: `{"sql": "...", "parameters": {...}}`
32+
- Örnek: `{"sql": "SELECT * FROM Orders WHERE CustomerID = @p1", "parameters": {"@p1": 5}}`
33+
34+
3. **DatabaseParserService Güncelle**
35+
- `ExecuteQueryAsync` metodu parametre desteği alsın
36+
- Her database türü için parametre ekleme:
37+
- SQL Server: `@p1, @p2`
38+
- PostgreSQL: `$1, $2`
39+
- MySQL: `?, ?`
40+
- SQLite: `?, ?`
41+
42+
4. **MultiDatabaseQueryCoordinator Güncelle**
43+
- `GenerateDatabaseQueriesAsync`: JSON parse et
44+
- Parametreleri AI'dan al
45+
- `ExecuteSingleDatabaseQueryAsync`: Parametreleri geç
46+
47+
5. **Test Et**
48+
- Cross-database queries
49+
- Parametre formatları (string, int, decimal, date)
50+
- Başarı oranını koru (%70+)
51+
52+
**Dosyalar:**
53+
- `src/SmartRAG/Models/SqlQueryWithParameters.cs` (yeni)
54+
- `src/SmartRAG/Services/MultiDatabaseQueryCoordinator.cs` (değişecek)
55+
- `src/SmartRAG/Services/DatabaseParserService.cs` (değişecek)
56+
- `src/SmartRAG/Interfaces/IDatabaseParserService.cs` (değişecek)
57+
58+
**Risk:**
59+
- AI JSON üretimi başarısız olabilir
60+
- Başarı oranı düşebilir
61+
- Breaking change (major version)
62+
63+
**Süre Tahmini:** 2-3 saat
64+
65+
---
66+
67+
## 🛠️ Code Quality
68+
69+
### SOLID/DRY Refactoring - MultiDatabaseQueryCoordinator
70+
**Issue:** `MultiDatabaseQueryCoordinator.cs` çok büyük (2346 satır) - God Class anti-pattern
71+
72+
**Refactoring Plan:**
73+
74+
```
75+
src/SmartRAG/Services/
76+
├── MultiDatabaseQueryCoordinator.cs (orchestrator only ~300 lines)
77+
├── QueryAnalysis/
78+
│ ├── QueryIntentAnalyzer.cs
79+
│ └── QueryIntentParser.cs
80+
├── SqlGeneration/
81+
│ ├── SqlQueryGenerator.cs
82+
│ ├── SqlPromptBuilder.cs
83+
│ └── SqlPromptTemplates.cs
84+
├── SqlValidation/
85+
│ ├── SqlValidator.cs
86+
│ ├── SqlSyntaxValidator.cs
87+
│ ├── SqlColumnValidator.cs
88+
│ └── SqlTableValidator.cs
89+
└── ResultMerging/
90+
├── QueryResultMerger.cs
91+
├── QueryResultParser.cs
92+
└── SmartJoinEngine.cs
93+
```
94+
95+
**Prensipler:**
96+
- **SRP (Single Responsibility):** Her sınıf tek bir iş yapsın
97+
- **OCP (Open/Closed):** Extension için açık, modification için kapalı
98+
- **DRY (Don't Repeat Yourself):** Tekrarlayan kod extraction
99+
100+
**Süre Tahmini:** 3-4 saat
101+
102+
---
103+
104+
## 📊 Feature Enhancements
105+
106+
### Test Success Rate İyileştirme
107+
**Hedef:** %72.7 → %90+
108+
109+
**Stratejiler:**
110+
1. AI prompt daha da netleştir
111+
2. SQL validation katmanı güçlendir
112+
3. Retry logic optimize et
113+
4. Smart merging geliştir
114+
115+
### Multi-Database Transaction Support
116+
**Özellik:** Cross-database transaction yönetimi
117+
118+
**Use Case:**
119+
```csharp
120+
using (var transaction = await coordinator.BeginTransactionAsync())
121+
{
122+
await coordinator.ExecuteAsync(db1Query);
123+
await coordinator.ExecuteAsync(db2Query);
124+
await transaction.CommitAsync();
125+
}
126+
```
127+
128+
### Query Caching
129+
**Özellik:** Aynı sorguları cache'le
130+
131+
**Faydalar:**
132+
- Performans artışı
133+
- AI token tasarrufu
134+
- Hızlı yanıt
135+
136+
---
137+
138+
## 🐛 Known Issues
139+
140+
### API Warnings (14 warnings)
141+
- XML documentation hataları
142+
- Async method warnings
143+
- Nullable reference warnings
144+
145+
**Hedef:** 0 warnings
146+
147+
---
148+
149+
## 📝 Notes
150+
151+
- Her TODO için ayrı branch açılmalı
152+
- Test coverage artırılmalı
153+
- Documentation güncel tutulmalı
154+
- Breaking changes için major version bump
155+
156+
**Last Updated:** 2025-10-21
157+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
namespace SmartRAG.Models
2+
{
3+
/// <summary>
4+
/// Configuration options for Google Speech-to-Text service
5+
/// </summary>
6+
public class GoogleSpeechConfig
7+
{
8+
/// <summary>
9+
/// Google Cloud Speech-to-Text API key or service account JSON path
10+
/// </summary>
11+
public string ApiKey { get; set; }
12+
13+
/// <summary>
14+
/// Default language for speech recognition (e.g., "tr-TR", "en-US")
15+
/// </summary>
16+
public string DefaultLanguage { get; set; } = "tr-TR";
17+
18+
/// <summary>
19+
/// Minimum confidence threshold for results (0.0 - 1.0)
20+
/// </summary>
21+
public double MinConfidenceThreshold { get; set; } = 0.5;
22+
23+
/// <summary>
24+
/// Include word-level timestamps in results
25+
/// </summary>
26+
public bool IncludeWordTimestamps { get; set; } = false;
27+
28+
/// <summary>
29+
/// Enable automatic punctuation
30+
/// </summary>
31+
public bool EnableAutomaticPunctuation { get; set; } = true;
32+
33+
/// <summary>
34+
/// Enable speaker diarization (speaker identification)
35+
/// </summary>
36+
public bool EnableSpeakerDiarization { get; set; } = false;
37+
38+
/// <summary>
39+
/// Maximum number of speakers to detect
40+
/// </summary>
41+
public int MaxSpeakerCount { get; set; } = 2;
42+
}
43+
}

0 commit comments

Comments
 (0)