jmisak commited on
Commit
5a061ee
Β·
verified Β·
1 Parent(s): fd77f04

Upload 8 files

Browse files
CHANGELOG.md ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+
3
+ All notable changes to ConversAI will be documented in this file.
4
+
5
+ ## [1.1.0] - 2025-11-XX
6
+
7
+ ### Changed
8
+ - **πŸ”„ IMPORTANT**: Updated HuggingFace Inference API endpoint
9
+ - Migrated from deprecated `api-inference.huggingface.co` to new `router.huggingface.co/hf-inference/`
10
+ - This change is required as of November 2025 (old endpoint returns 404 errors)
11
+ - No user action required - update is automatic
12
+
13
+ ### Fixed
14
+ - Fixed HuggingFace API 404 errors due to deprecated endpoint
15
+ - Updated all documentation to reflect new API
16
+
17
+ ### Technical Details
18
+ - Old endpoint: `https://api-inference.huggingface.co/models/{model}`
19
+ - New endpoint: `https://router.huggingface.co/hf-inference/models/{model}`
20
+ - Affects: `llm_backend.py` line 81
21
+
22
+ ---
23
+
24
+ ## [1.0.0] - 2025-10-25
25
+
26
+ ### Added
27
+ - ✨ Initial release of ConversAI
28
+ - πŸ“ Survey generation from outlines with AI
29
+ - 🌍 Multi-language translation (18+ languages)
30
+ - πŸ“Š AI-assisted qualitative data analysis
31
+ - πŸ”§ Support for multiple LLM providers (OpenAI, Anthropic, HuggingFace, LM Studio)
32
+ - πŸ“± Gradio web interface
33
+ - πŸ“¦ Export functionality (JSON, Markdown)
34
+ - πŸ”’ Privacy-focused design (no permanent storage)
35
+ - πŸ“š Comprehensive documentation suite
36
+ - πŸ› οΈ Diagnostic tools (check_env.py, test_hf_backend.py)
37
+
38
+ ### Documentation
39
+ - USER_GUIDE.md - Complete user guide
40
+ - QUICK_START_HF_SPACES.md - Fast deployment guide
41
+ - TROUBLESHOOTING.md - Common issues and solutions
42
+ - DEPLOYMENT.md - Detailed deployment instructions
43
+ - USAGE_GUIDE.md - Technical usage guide
44
+ - DOCUMENTATION_INDEX.md - Documentation navigation
45
+
46
+ ### Features
47
+
48
+ **Survey Generation:**
49
+ - Industry best practices automatically applied
50
+ - Qualitative, quantitative, and mixed method support
51
+ - Customizable question count and audience targeting
52
+ - Professional introduction and closing messages
53
+
54
+ **Translation:**
55
+ - 18+ language support
56
+ - Cultural adaptation, not just word-for-word translation
57
+ - Batch translation capability
58
+ - Back-translation support for validation
59
+
60
+ **Data Analysis:**
61
+ - Thematic analysis with theme extraction
62
+ - Sentiment analysis and emotional insights
63
+ - Executive summaries
64
+ - Key insights and trends identification
65
+ - Statistics and quality metrics
66
+
67
+ **Technical:**
68
+ - Modular architecture with clean code
69
+ - Comprehensive error handling
70
+ - Environment-based configuration
71
+ - Production-ready deployment options
72
+ - Zero-config HuggingFace Spaces support
73
+
74
+ ---
75
+
76
+ ## Migration Notes
77
+
78
+ ### From 1.0.0 to 1.1.0
79
+
80
+ **HuggingFace Users:**
81
+ - If you deployed before November 2025, update your `llm_backend.py` file
82
+ - No configuration changes needed
83
+ - API token usage remains the same
84
+
85
+ **How to Update:**
86
+ Replace line 80 in `llm_backend.py`:
87
+ ```python
88
+ # Old (deprecated)
89
+ return f"https://api-inference.huggingface.co/models/{self.model}"
90
+
91
+ # New (required)
92
+ return f"https://router.huggingface.co/hf-inference/models/{self.model}"
93
+ ```
94
+
95
+ Or simply pull the latest version from the repository.
96
+
97
+ ---
98
+
99
+ ## Future Roadmap
100
+
101
+ ### Planned Features
102
+ - API integration for programmatic access
103
+ - Custom model fine-tuning support
104
+ - Survey response collection module
105
+ - Advanced analytics (cross-tab analysis, statistical tests)
106
+ - Template library for common survey types
107
+ - Collaboration features (team sharing, comments)
108
+ - Integration with popular survey platforms
109
+ - Mobile app for data collection
110
+
111
+ ### Potential Enhancements
112
+ - Real-time response streaming
113
+ - Batch processing for large datasets
114
+ - Custom AI prompt templates
115
+ - Survey versioning and A/B testing
116
+ - Advanced visualization options
117
+ - Export to more formats (PDF, PowerPoint)
118
+ - Multi-user authentication
119
+ - Admin dashboard
120
+
121
+ ---
122
+
123
+ ## Support
124
+
125
+ For issues, questions, or feature requests:
126
+ - Check TROUBLESHOOTING.md
127
+ - Review DOCUMENTATION_INDEX.md
128
+ - Run diagnostic tools (check_env.py)
129
+ - Open an issue on GitHub
130
+
131
+ ---
132
+
133
+ **ConversAI** - AI-Powered Qualitative Research Assistant
DOCUMENTATION_INDEX.md ADDED
@@ -0,0 +1,489 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ConversAI Documentation Index
2
+
3
+ Complete guide to all available documentation for ConversAI.
4
+
5
+ ---
6
+
7
+ ## πŸ“š Documentation Overview
8
+
9
+ ConversAI comes with comprehensive documentation covering everything from quick setup to advanced usage. Choose the document that best fits your needs.
10
+
11
+ ---
12
+
13
+ ## 🎯 Quick Navigation
14
+
15
+ ### πŸ”„ Important Update (Nov 2025)
16
+ **[MIGRATION_NOTICE.md](MIGRATION_NOTICE.md)** - HuggingFace API update (if you see 404 errors)
17
+
18
+ ### New Users - Start Here!
19
+ 1. **[USER_GUIDE.md](USER_GUIDE.md)** ⭐ **START HERE** - Complete user guide
20
+ 2. **[QUICK_START_HF_SPACES.md](QUICK_START_HF_SPACES.md)** - 5-minute deployment guide
21
+ 3. **[README.md](README.md)** - Project overview and quick reference
22
+
23
+ ### Having Issues?
24
+ 4. **[TROUBLESHOOTING.md](TROUBLESHOOTING.md)** - Solutions to common problems
25
+ 5. **[MIGRATION_NOTICE.md](MIGRATION_NOTICE.md)** - Fix 404 errors (HuggingFace API update)
26
+ 6. **Run `python check_env.py`** - Diagnose configuration issues
27
+
28
+ ### Developers & Advanced Users
29
+ 6. **[DEPLOYMENT.md](DEPLOYMENT.md)** - Detailed deployment instructions
30
+ 7. **[USAGE_GUIDE.md](USAGE_GUIDE.md)** - Technical usage documentation
31
+
32
+ ---
33
+
34
+ ## πŸ“– Document Descriptions
35
+
36
+ ### MIGRATION_NOTICE.md - HuggingFace API Update
37
+ **πŸ‘€ Audience:** All HuggingFace users (CRITICAL if you see 404 errors)
38
+ **πŸ“ Length:** Quick reference (~1,500 words)
39
+ **⏱️ Read Time:** 5 minutes
40
+
41
+ **What's Inside:**
42
+ - βœ… Explanation of HuggingFace API endpoint change
43
+ - βœ… How to verify you're using the new endpoint
44
+ - βœ… Update instructions if needed
45
+ - βœ… Troubleshooting 404 errors
46
+ - βœ… FAQ about the migration
47
+
48
+ **Best For:**
49
+ - Fixing 404 errors with HuggingFace
50
+ - Understanding the API migration
51
+ - Verifying your deployment is updated
52
+ - Users who deployed before November 2025
53
+
54
+ ---
55
+
56
+ ### CHANGELOG.md - Version History
57
+ **πŸ‘€ Audience:** All users, especially those tracking changes
58
+ **πŸ“ Length:** Growing document
59
+ **⏱️ Read Time:** 5 minutes
60
+
61
+ **What's Inside:**
62
+ - βœ… All version changes and updates
63
+ - βœ… Migration notes between versions
64
+ - βœ… Bug fixes and improvements
65
+ - βœ… Future roadmap
66
+
67
+ **Best For:**
68
+ - Understanding what's changed
69
+ - Migration between versions
70
+ - Tracking new features
71
+ - Planning upgrades
72
+
73
+ ---
74
+
75
+ ### USER_GUIDE.md - Complete User Guide
76
+ **πŸ‘€ Audience:** All users (non-technical friendly)
77
+ **πŸ“ Length:** Comprehensive (~8,000 words)
78
+ **⏱️ Read Time:** 30-40 minutes (or use as reference)
79
+
80
+ **What's Inside:**
81
+ - βœ… What ConversAI does and why it's production-grade
82
+ - βœ… Step-by-step guides for all three features
83
+ - βœ… Complete workflow examples
84
+ - βœ… Best practices and tips
85
+ - βœ… Use case library with real scenarios
86
+ - βœ… Privacy and security information
87
+ - βœ… Success stories and metrics
88
+ - βœ… Quality checklists
89
+ - βœ… When to use vs. traditional methods
90
+
91
+ **Best For:**
92
+ - First-time users learning the platform
93
+ - Understanding production-grade features
94
+ - Learning best practices
95
+ - Seeing real-world examples
96
+ - Understanding capabilities and limitations
97
+
98
+ ---
99
+
100
+ ### QUICK_START_HF_SPACES.md - Fast Deployment
101
+ **πŸ‘€ Audience:** Anyone deploying to HuggingFace Spaces
102
+ **πŸ“ Length:** Quick reference (~2,000 words)
103
+ **⏱️ Read Time:** 5-10 minutes
104
+
105
+ **What's Inside:**
106
+ - βœ… 5-minute deployment steps
107
+ - βœ… Zero-configuration setup
108
+ - βœ… Troubleshooting common issues
109
+ - βœ… Performance tips
110
+ - βœ… Testing instructions
111
+
112
+ **Best For:**
113
+ - Getting started quickly
114
+ - Deploying to HuggingFace Spaces
115
+ - Zero-config setup
116
+ - Quick reference during deployment
117
+
118
+ ---
119
+
120
+ ### TROUBLESHOOTING.md - Problem Solving
121
+ **πŸ‘€ Audience:** Users experiencing issues
122
+ **πŸ“ Length:** Comprehensive reference (~3,000 words)
123
+ **⏱️ Read Time:** 10-15 minutes (or search for your issue)
124
+
125
+ **What's Inside:**
126
+ - βœ… Common errors and solutions
127
+ - βœ… Configuration problems
128
+ - βœ… Performance issues
129
+ - βœ… Debugging steps
130
+ - βœ… Emergency fixes
131
+ - βœ… Environment diagnostics
132
+
133
+ **Best For:**
134
+ - Fixing "LLM backend not configured" errors
135
+ - Solving slow performance
136
+ - Debugging startup issues
137
+ - Understanding error messages
138
+ - Getting unstuck quickly
139
+
140
+ ---
141
+
142
+ ### README.md - Project Overview
143
+ **πŸ‘€ Audience:** All users, especially new visitors
144
+ **πŸ“ Length:** Quick overview (~1,500 words)
145
+ **⏱️ Read Time:** 5 minutes
146
+
147
+ **What's Inside:**
148
+ - βœ… Project description
149
+ - βœ… Key features overview
150
+ - βœ… Quick start instructions
151
+ - βœ… Configuration basics
152
+ - βœ… Architecture overview
153
+ - βœ… Installation steps
154
+
155
+ **Best For:**
156
+ - First impression of the project
157
+ - Understanding what ConversAI does
158
+ - Quick setup reference
159
+ - GitHub/HuggingFace Space homepage
160
+
161
+ ---
162
+
163
+ ### DEPLOYMENT.md - Detailed Deployment
164
+ **πŸ‘€ Audience:** Developers, DevOps, advanced users
165
+ **πŸ“ Length:** Comprehensive (~3,500 words)
166
+ **⏱️ Read Time:** 15-20 minutes
167
+
168
+ **What's Inside:**
169
+ - βœ… HuggingFace Spaces deployment
170
+ - βœ… Local development setup
171
+ - βœ… Docker deployment
172
+ - βœ… Provider configuration details
173
+ - βœ… Monitoring and maintenance
174
+ - βœ… Scaling considerations
175
+ - βœ… Security best practices
176
+
177
+ **Best For:**
178
+ - Production deployments
179
+ - Self-hosting
180
+ - Docker containerization
181
+ - Scaling for heavy usage
182
+ - Enterprise deployments
183
+
184
+ ---
185
+
186
+ ### USAGE_GUIDE.md - Technical Usage
187
+ **πŸ‘€ Audience:** Technical users, researchers
188
+ **πŸ“ Length:** Detailed reference (~4,000 words)
189
+ **⏱️ Read Time:** 20 minutes
190
+
191
+ **What's Inside:**
192
+ - βœ… Detailed feature workflows
193
+ - βœ… File format specifications
194
+ - βœ… JSON examples
195
+ - βœ… API usage patterns
196
+ - βœ… Command-line tips
197
+ - βœ… Advanced configurations
198
+
199
+ **Best For:**
200
+ - Technical implementation details
201
+ - Understanding file formats
202
+ - Programmatic usage
203
+ - Advanced configurations
204
+ - Integration with other tools
205
+
206
+ ---
207
+
208
+ ### check_env.py - Environment Checker
209
+ **πŸ‘€ Audience:** All users (diagnostic tool)
210
+ **πŸ“ Type:** Executable Python script
211
+ **⏱️ Run Time:** 5 seconds
212
+
213
+ **What It Does:**
214
+ - βœ… Checks for API keys and tokens
215
+ - βœ… Validates Python dependencies
216
+ - βœ… Shows which LLM provider will be used
217
+ - βœ… Diagnoses configuration issues
218
+ - βœ… Provides fix suggestions
219
+
220
+ **How to Use:**
221
+ ```bash
222
+ python check_env.py
223
+ ```
224
+
225
+ **Best For:**
226
+ - Diagnosing "backend not configured" errors
227
+ - Verifying setup before deployment
228
+ - Troubleshooting credential issues
229
+ - Understanding environment state
230
+
231
+ ---
232
+
233
+ ### test_hf_backend.py - Connection Tester
234
+ **πŸ‘€ Audience:** Developers, troubleshooters
235
+ **πŸ“ Type:** Executable Python script
236
+ **⏱️ Run Time:** 30-60 seconds
237
+
238
+ **What It Does:**
239
+ - βœ… Tests HuggingFace Inference API connection
240
+ - βœ… Validates token functionality
241
+ - βœ… Tests survey generation
242
+ - βœ… Shows detailed error messages
243
+
244
+ **How to Use:**
245
+ ```bash
246
+ python test_hf_backend.py
247
+ ```
248
+
249
+ **Best For:**
250
+ - Testing HuggingFace connectivity
251
+ - Validating API tokens
252
+ - Debugging generation issues
253
+ - Verifying setup works end-to-end
254
+
255
+ ---
256
+
257
+ ## πŸ—ΊοΈ Documentation Roadmap by User Journey
258
+
259
+ ### Journey 1: First-Time User on HuggingFace Spaces
260
+
261
+ ```
262
+ 1. README.md (2 min)
263
+ ↓ "What is this?"
264
+
265
+ 2. QUICK_START_HF_SPACES.md (5 min)
266
+ ↓ "How do I deploy?"
267
+
268
+ 3. USER_GUIDE.md - "How to Use" section (10 min)
269
+ ↓ "How do I use it?"
270
+
271
+ 4. Try the app!
272
+ ↓ If issues arise...
273
+
274
+ 5. TROUBLESHOOTING.md (as needed)
275
+ ```
276
+
277
+ **Total Time to Success:** 20-30 minutes
278
+
279
+ ---
280
+
281
+ ### Journey 2: Self-Hosting Developer
282
+
283
+ ```
284
+ 1. README.md (5 min)
285
+ ↓ "What is this?"
286
+
287
+ 2. DEPLOYMENT.md - Local Setup (10 min)
288
+ ↓ "How do I install?"
289
+
290
+ 3. Run: python check_env.py (1 min)
291
+ ↓ "Is it configured?"
292
+
293
+ 4. USAGE_GUIDE.md (15 min)
294
+ ↓ "How do I use it?"
295
+
296
+ 5. USER_GUIDE.md - Best Practices (skim)
297
+ ↓ If issues arise...
298
+
299
+ 6. TROUBLESHOOTING.md (as needed)
300
+ ```
301
+
302
+ **Total Time to Success:** 30-45 minutes
303
+
304
+ ---
305
+
306
+ ### Journey 3: Researcher/End User
307
+
308
+ ```
309
+ 1. USER_GUIDE.md - "What ConversAI Does" (5 min)
310
+ ↓ "Can this help my research?"
311
+
312
+ 2. USER_GUIDE.md - "How to Use" for your feature (10 min)
313
+ ↓ "How do I do X?"
314
+
315
+ 3. USER_GUIDE.md - Workflow Examples (10 min)
316
+ ↓ "Show me a real example"
317
+
318
+ 4. Try the app with examples
319
+ ↓ Regular usage...
320
+
321
+ 5. USER_GUIDE.md - Tips for Power Users (reference)
322
+ ```
323
+
324
+ **Total Time to Productivity:** 30 minutes
325
+
326
+ ---
327
+
328
+ ### Journey 4: Enterprise Deployment
329
+
330
+ ```
331
+ 1. README.md (5 min)
332
+ ↓ "Is this production-ready?"
333
+
334
+ 2. USER_GUIDE.md - Production-Grade section (10 min)
335
+ ↓ "What makes it production-grade?"
336
+
337
+ 3. DEPLOYMENT.md - Complete guide (30 min)
338
+ ↓ "How do we deploy?"
339
+
340
+ 4. USER_GUIDE.md - Privacy & Security (5 min)
341
+ ↓ "Is it secure for our data?"
342
+
343
+ 5. DEPLOYMENT.md - Scaling & Monitoring (10 min)
344
+ ↓ "How do we operate it?"
345
+
346
+ 6. Set up with enterprise LLM provider
347
+ ```
348
+
349
+ **Total Time to Production:** 1-2 hours of reading, plus setup time
350
+
351
+ ---
352
+
353
+ ## πŸ“Š Documentation by Topic
354
+
355
+ ### Setup & Installation
356
+ - **Quick Setup:** QUICK_START_HF_SPACES.md
357
+ - **Detailed Setup:** DEPLOYMENT.md
358
+ - **Troubleshooting:** TROUBLESHOOTING.md
359
+ - **Environment Check:** check_env.py
360
+
361
+ ### Using ConversAI
362
+ - **Complete Guide:** USER_GUIDE.md
363
+ - **Technical Details:** USAGE_GUIDE.md
364
+ - **Quick Reference:** README.md
365
+
366
+ ### Problem Solving
367
+ - **Common Issues:** TROUBLESHOOTING.md
368
+ - **Environment Issues:** check_env.py
369
+ - **Connection Issues:** test_hf_backend.py
370
+
371
+ ### Advanced Topics
372
+ - **Production Deployment:** DEPLOYMENT.md
373
+ - **Scaling:** DEPLOYMENT.md - Scaling section
374
+ - **Security:** USER_GUIDE.md - Privacy section
375
+ - **API Integration:** USAGE_GUIDE.md
376
+
377
+ ---
378
+
379
+ ## πŸ” Finding What You Need
380
+
381
+ ### By Question
382
+
383
+ **"How do I deploy this?"**
384
+ β†’ QUICK_START_HF_SPACES.md or DEPLOYMENT.md
385
+
386
+ **"What can this do?"**
387
+ β†’ README.md or USER_GUIDE.md - What ConversAI Does
388
+
389
+ **"How do I use feature X?"**
390
+ β†’ USER_GUIDE.md - Feature Guide: [Feature Name]
391
+
392
+ **"Why isn't it working?"**
393
+ β†’ TROUBLESHOOTING.md or run check_env.py
394
+
395
+ **"Is this production-ready?"**
396
+ β†’ USER_GUIDE.md - Production-Grade section
397
+
398
+ **"How do I translate surveys?"**
399
+ β†’ USER_GUIDE.md - Feature Guide: Survey Translation
400
+
401
+ **"What are best practices?"**
402
+ β†’ USER_GUIDE.md - Tips sections
403
+
404
+ **"How much does it cost?"**
405
+ β†’ USER_GUIDE.md - Optimizing for Cost
406
+
407
+ **"Is my data safe?"**
408
+ β†’ USER_GUIDE.md - Privacy & Data Security
409
+
410
+ **"Can I use this for [use case]?"**
411
+ β†’ USER_GUIDE.md - Use Case Library
412
+
413
+ ---
414
+
415
+ ## πŸ’‘ Documentation Tips
416
+
417
+ ### For Readers
418
+
419
+ 1. **Don't read everything** - Use the index to find what you need
420
+ 2. **Start with USER_GUIDE.md** if unsure where to begin
421
+ 3. **Use search** (Ctrl+F) within documents
422
+ 4. **Check examples** - Most docs include real examples
423
+ 5. **Run diagnostics first** - check_env.py saves time
424
+
425
+ ### For Contributors
426
+
427
+ 1. **Keep docs in sync** - Update all relevant docs when making changes
428
+ 2. **Include examples** - Show, don't just tell
429
+ 3. **Link between docs** - Help readers navigate
430
+ 4. **Test instructions** - Verify steps actually work
431
+ 5. **Update this index** - When adding new documentation
432
+
433
+ ---
434
+
435
+ ## πŸ“‹ Documentation Checklist
436
+
437
+ When starting with ConversAI, ensure you've read:
438
+
439
+ **Minimum (Quick Start):**
440
+ - [ ] README.md - Know what it does
441
+ - [ ] QUICK_START_HF_SPACES.md - Deploy it
442
+ - [ ] USER_GUIDE.md - "How to Use" sections for features you need
443
+
444
+ **Recommended (Full Setup):**
445
+ - [ ] USER_GUIDE.md - Complete guide
446
+ - [ ] TROUBLESHOOTING.md - Skim common issues
447
+ - [ ] Run check_env.py - Verify setup
448
+
449
+ **Advanced (Production):**
450
+ - [ ] DEPLOYMENT.md - Full deployment guide
451
+ - [ ] USER_GUIDE.md - Privacy & Production sections
452
+ - [ ] USAGE_GUIDE.md - Technical details
453
+
454
+ ---
455
+
456
+ ## πŸ”„ Documentation Updates
457
+
458
+ **Last Updated:** 2025
459
+ **Version:** 1.0
460
+
461
+ **Recent Changes:**
462
+ - Added comprehensive USER_GUIDE.md
463
+ - Created this documentation index
464
+ - Enhanced troubleshooting guide
465
+ - Added diagnostic scripts
466
+
467
+ **Upcoming:**
468
+ - Video tutorials
469
+ - API documentation
470
+ - Integration guides
471
+ - Case study library
472
+
473
+ ---
474
+
475
+ ## πŸ“ž Still Need Help?
476
+
477
+ After reading the relevant documentation:
478
+
479
+ 1. **Check logs** - Look for error messages
480
+ 2. **Run diagnostics** - `python check_env.py`
481
+ 3. **Search docs** - Use Ctrl+F in documents
482
+ 4. **Check issues** - GitHub issues for similar problems
483
+ 5. **Ask for help** - Provide diagnostic output and what you tried
484
+
485
+ ---
486
+
487
+ **Happy researching!** πŸ”¬
488
+
489
+ *Choose your documentation path above and get started with ConversAI.*
MIGRATION_NOTICE.md ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # πŸ”„ IMPORTANT: HuggingFace API Migration Notice
2
+
3
+ ## Critical Update - November 2025
4
+
5
+ HuggingFace has deprecated their old Inference API endpoint and migrated to a new Inference Providers API.
6
+
7
+ ---
8
+
9
+ ## ⚠️ What Changed
10
+
11
+ **Old Endpoint (DEPRECATED - Returns 404):**
12
+ ```
13
+ https://api-inference.huggingface.co/models/{model}
14
+ ```
15
+
16
+ **New Endpoint (REQUIRED as of Nov 1, 2025):**
17
+ ```
18
+ https://router.huggingface.co/hf-inference/models/{model}
19
+ ```
20
+
21
+ ---
22
+
23
+ ## βœ… This Version is Updated
24
+
25
+ **Good news:** If you're using this version of ConversAI, the update is already applied!
26
+
27
+ The code has been updated to use the new Inference Providers API automatically.
28
+
29
+ ---
30
+
31
+ ## πŸ” How to Verify
32
+
33
+ **Run the test script:**
34
+ ```bash
35
+ python test_hf_backend.py
36
+ ```
37
+
38
+ **Look for this line:**
39
+ ```
40
+ βœ“ Using new Inference Providers API endpoint
41
+ ```
42
+
43
+ **Or check manually:**
44
+ ```bash
45
+ python check_env.py
46
+ ```
47
+
48
+ ---
49
+
50
+ ## πŸ“¦ What You Need to Do
51
+
52
+ ### If You Deployed BEFORE November 2025:
53
+
54
+ **Option 1: Update the Code (Recommended)**
55
+ 1. Pull the latest version of `llm_backend.py`
56
+ 2. Restart your application
57
+ 3. Test with `python test_hf_backend.py`
58
+
59
+ **Option 2: Manual Update**
60
+
61
+ Edit `llm_backend.py` around line 80:
62
+
63
+ ```python
64
+ # Find this line:
65
+ return f"https://api-inference.huggingface.co/models/{self.model}"
66
+
67
+ # Replace with:
68
+ return f"https://router.huggingface.co/hf-inference/models/{self.model}"
69
+ ```
70
+
71
+ ### If You're Deploying NEW:
72
+
73
+ **No action needed!** The latest code already uses the new endpoint.
74
+
75
+ ---
76
+
77
+ ## πŸ› Symptoms of Old Endpoint
78
+
79
+ If you're still using the old endpoint, you'll see:
80
+
81
+ ```
82
+ ❌ Error generating survey: Survey generation failed:
83
+ LLM generation failed: 404 Client Error: Not Found for url:
84
+ https://api-inference.huggingface.co/models/mistralai/Mixtral-8x7B-Instruct-v0.1
85
+ ```
86
+
87
+ **Solution:** Update to the new endpoint as described above.
88
+
89
+ ---
90
+
91
+ ## πŸ“š More Information
92
+
93
+ **Official HuggingFace Announcement:**
94
+ - Migration deadline: November 1, 2025
95
+ - Old endpoint returns 404 errors after deadline
96
+ - New API docs: https://huggingface.co/docs/inference-providers
97
+
98
+ **Benefits of New API:**
99
+ - Access to more models
100
+ - Better performance and reliability
101
+ - Unified API across all inference services
102
+ - Future-proof for new features
103
+
104
+ ---
105
+
106
+ ## ❓ FAQ
107
+
108
+ **Q: Do I need a new API token?**
109
+ A: No, your existing HF_TOKEN or HUGGINGFACE_API_KEY works with the new endpoint.
110
+
111
+ **Q: Will this affect my deployed HuggingFace Space?**
112
+ A: Yes, if it was deployed before this update. Simply update the code and restart.
113
+
114
+ **Q: Do I need to change any configuration?**
115
+ A: No, just update the code. All configuration remains the same.
116
+
117
+ **Q: What if I use OpenAI or Anthropic?**
118
+ A: This change only affects HuggingFace users. Other providers are unaffected.
119
+
120
+ **Q: Will my old surveys/data still work?**
121
+ A: Yes, this is only an API endpoint change. All data formats remain compatible.
122
+
123
+ **Q: How do I know if I'm affected?**
124
+ A: If you see 404 errors when using HuggingFace provider, you need to update.
125
+
126
+ ---
127
+
128
+ ## βœ… Verification Checklist
129
+
130
+ After updating, verify everything works:
131
+
132
+ - [ ] Updated `llm_backend.py` to use new endpoint
133
+ - [ ] Ran `python test_hf_backend.py` - shows new endpoint
134
+ - [ ] Tested survey generation - works without 404 errors
135
+ - [ ] Tested translation - works correctly
136
+ - [ ] Tested analysis - works correctly
137
+ - [ ] No 404 errors in logs
138
+ - [ ] Application runs normally
139
+
140
+ ---
141
+
142
+ ## πŸ†˜ Need Help?
143
+
144
+ **If you're still getting 404 errors after updating:**
145
+
146
+ 1. **Verify the update:**
147
+ ```bash
148
+ grep "router.huggingface.co" llm_backend.py
149
+ ```
150
+ Should return a match. If not, update wasn't applied.
151
+
152
+ 2. **Check you're using HuggingFace:**
153
+ ```bash
154
+ python check_env.py
155
+ ```
156
+ Look for which provider is being used.
157
+
158
+ 3. **Test the connection:**
159
+ ```bash
160
+ python test_hf_backend.py
161
+ ```
162
+ Should show "βœ“ Using new Inference Providers API endpoint"
163
+
164
+ 4. **Clear any caches:**
165
+ - Restart your application
166
+ - On HF Spaces: Factory reboot the Space
167
+
168
+ 5. **Still stuck?**
169
+ - Check TROUBLESHOOTING.md
170
+ - Verify your HF_TOKEN is still valid
171
+ - Try with a different model
172
+
173
+ ---
174
+
175
+ ## πŸ“‹ Migration Timeline
176
+
177
+ | Date | Event |
178
+ |------|-------|
179
+ | January 2025 | Old endpoint deprecated, warnings sent |
180
+ | November 1, 2025 | Old endpoint returns 404 errors |
181
+ | **Today** | **This version updated to new endpoint** |
182
+
183
+ ---
184
+
185
+ ## πŸš€ Bottom Line
186
+
187
+ **If you're using this version:** βœ… You're all set! The update is already applied.
188
+
189
+ **If you deployed before:** πŸ”„ Update your code to the latest version.
190
+
191
+ **If you see 404 errors:** ⚠️ Follow the update instructions above.
192
+
193
+ ---
194
+
195
+ **Updated:** November 2025
196
+ **Status:** Migration Complete βœ…
197
+ **Action Required:** Update existing deployments to latest code
198
+
199
+ For more details, see [CHANGELOG.md](CHANGELOG.md)
QUICK_START_HF_SPACES.md CHANGED
@@ -38,7 +38,7 @@ Upload these files to your Space (drag and drop or use Git):
38
 
39
  ### 4. Test It!
40
 
41
- **That's it!** No configuration needed. The app automatically uses HuggingFace's free Inference API.
42
 
43
  **Try these:**
44
  1. Go to "Generate Survey" tab
 
38
 
39
  ### 4. Test It!
40
 
41
+ **That's it!** No configuration needed. The app automatically uses HuggingFace's free Inference Providers API (updated Nov 2025).
42
 
43
  **Try these:**
44
  1. Go to "Generate Survey" tab
README.md CHANGED
@@ -14,6 +14,12 @@ license: mit
14
 
15
  Battle the blank page, reach global audiences, and uncover insights with AI assistance.
16
 
 
 
 
 
 
 
17
  ## 🌟 Features
18
 
19
  ### πŸ“ Survey Generation
@@ -49,11 +55,12 @@ Battle the blank page, reach global audiences, and uncover insights with AI assi
49
 
50
  ### HuggingFace Spaces (Default)
51
 
52
- **No configuration needed!** The app automatically uses HuggingFace's Inference API.
53
 
54
  - Uses built-in `HF_TOKEN` (automatically available in **PUBLIC** Spaces)
55
  - Default model: `mistralai/Mixtral-8x7B-Instruct-v0.1`
56
  - Free tier available
 
57
 
58
  **⚠️ Important:** Your Space must be **PUBLIC** for HF_TOKEN to be automatically available.
59
 
@@ -126,4 +133,23 @@ MIT License - Feel free to use for research and commercial purposes.
126
 
127
  ---
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  Built with ❀️ using Gradio and state-of-the-art LLMs
 
14
 
15
  Battle the blank page, reach global audiences, and uncover insights with AI assistance.
16
 
17
+ ---
18
+
19
+ > **πŸ”„ IMPORTANT UPDATE (Nov 2025):** HuggingFace API endpoint updated to new Inference Providers API. This version is already updated. See [MIGRATION_NOTICE.md](MIGRATION_NOTICE.md) if you're experiencing 404 errors.
20
+
21
+ ---
22
+
23
  ## 🌟 Features
24
 
25
  ### πŸ“ Survey Generation
 
55
 
56
  ### HuggingFace Spaces (Default)
57
 
58
+ **No configuration needed!** The app automatically uses HuggingFace's Inference Providers API.
59
 
60
  - Uses built-in `HF_TOKEN` (automatically available in **PUBLIC** Spaces)
61
  - Default model: `mistralai/Mixtral-8x7B-Instruct-v0.1`
62
  - Free tier available
63
+ - **Updated**: Now uses new Inference Providers API endpoint (Nov 2025)
64
 
65
  **⚠️ Important:** Your Space must be **PUBLIC** for HF_TOKEN to be automatically available.
66
 
 
133
 
134
  ---
135
 
136
+ ## πŸ“š Documentation
137
+
138
+ **New to ConversAI?** Start with **[USER_GUIDE.md](USER_GUIDE.md)** for a complete walkthrough.
139
+
140
+ **Full Documentation Index:** See **[DOCUMENTATION_INDEX.md](DOCUMENTATION_INDEX.md)** for all available guides.
141
+
142
+ **Quick Links:**
143
+ - πŸ“– [Complete User Guide](USER_GUIDE.md) - How to use ConversAI (START HERE)
144
+ - ⚑ [Quick Start for HF Spaces](QUICK_START_HF_SPACES.md) - 5-minute deployment
145
+ - πŸ”§ [Troubleshooting](TROUBLESHOOTING.md) - Common issues and solutions
146
+ - πŸš€ [Deployment Guide](DEPLOYMENT.md) - Detailed deployment instructions
147
+ - πŸ“‹ [Usage Guide](USAGE_GUIDE.md) - Technical usage documentation
148
+
149
+ **Diagnostic Tools:**
150
+ - Run `python check_env.py` - Check your environment setup
151
+ - Run `python test_hf_backend.py` - Test HuggingFace connection
152
+
153
+ ---
154
+
155
  Built with ❀️ using Gradio and state-of-the-art LLMs
TROUBLESHOOTING.md CHANGED
@@ -2,6 +2,19 @@
2
 
3
  ## Common Issues and Solutions
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ### ❌ "LLM backend not configured" Error
6
 
7
  **Symptom:** App shows warning banner, features don't work
 
2
 
3
  ## Common Issues and Solutions
4
 
5
+ ### πŸ”„ HuggingFace API Update (November 2025)
6
+
7
+ **Important:** HuggingFace has updated their Inference API endpoint.
8
+
9
+ **If you see 404 errors:**
10
+ - βœ… Make sure you're using the latest version of `llm_backend.py`
11
+ - βœ… The new endpoint is: `https://router.huggingface.co/hf-inference/`
12
+ - βœ… Old endpoint (`api-inference.huggingface.co`) is deprecated
13
+
14
+ **Already updated:** This version uses the new Inference Providers API automatically.
15
+
16
+ ---
17
+
18
  ### ❌ "LLM backend not configured" Error
19
 
20
  **Symptom:** App shows warning banner, features don't work
llm_backend.py CHANGED
@@ -77,7 +77,8 @@ class LLMBackend:
77
  elif self.provider == LLMProvider.ANTHROPIC:
78
  return "https://api.anthropic.com/v1/messages"
79
  elif self.provider == LLMProvider.HUGGINGFACE:
80
- return f"https://api-inference.huggingface.co/models/{self.model}"
 
81
  elif self.provider == LLMProvider.LM_STUDIO:
82
  return os.getenv("LM_STUDIO_URL", "http://192.168.1.245:1234/v1/chat/completions")
83
 
 
77
  elif self.provider == LLMProvider.ANTHROPIC:
78
  return "https://api.anthropic.com/v1/messages"
79
  elif self.provider == LLMProvider.HUGGINGFACE:
80
+ # Updated to new Inference Providers API (Nov 2025)
81
+ return f"https://router.huggingface.co/hf-inference/models/{self.model}"
82
  elif self.provider == LLMProvider.LM_STUDIO:
83
  return os.getenv("LM_STUDIO_URL", "http://192.168.1.245:1234/v1/chat/completions")
84
 
test_hf_backend.py CHANGED
@@ -8,7 +8,8 @@ from llm_backend import LLMBackend, LLMProvider
8
  def test_hf_connection():
9
  """Test HuggingFace Inference API connection"""
10
  print("="*60)
11
- print("Testing HuggingFace Inference API Connection")
 
12
  print("="*60)
13
 
14
  # Check for token
@@ -27,6 +28,13 @@ def test_hf_connection():
27
  print(f" Provider: {backend.provider.value}")
28
  print(f" Model: {backend.model}")
29
  print(f" API URL: {backend.api_url}")
 
 
 
 
 
 
 
30
  except Exception as e:
31
  print(f"βœ— Backend initialization failed: {e}")
32
  return False
 
8
  def test_hf_connection():
9
  """Test HuggingFace Inference API connection"""
10
  print("="*60)
11
+ print("Testing HuggingFace Inference Providers API Connection")
12
+ print("(Updated Nov 2025 - New Endpoint)")
13
  print("="*60)
14
 
15
  # Check for token
 
28
  print(f" Provider: {backend.provider.value}")
29
  print(f" Model: {backend.model}")
30
  print(f" API URL: {backend.api_url}")
31
+
32
+ # Verify we're using the new endpoint
33
+ if "router.huggingface.co/hf-inference" in backend.api_url:
34
+ print(f" βœ“ Using new Inference Providers API endpoint")
35
+ else:
36
+ print(f" ⚠️ WARNING: Not using new endpoint! Update llm_backend.py")
37
+
38
  except Exception as e:
39
  print(f"βœ— Backend initialization failed: {e}")
40
  return False