Spaces:
Running
Running
Update support documentation to reflect current interface structure
Browse files- Add detailed three-tab interface description with clear workflow steps
- Add comprehensive Preview tab usage section with testing guidance
- Restructure tool settings to match current Configuration tab layout
- Update workflow descriptions to align with actual interface organization
- support_docs.py +95 -33
support_docs.py
CHANGED
@@ -17,10 +17,18 @@ def create_support_docs():
|
|
17 |
gr.Markdown("""
|
18 |
### Quick Start Guide
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
**Prerequisites:**
|
26 |
- HuggingFace account (free at huggingface.co)
|
@@ -116,6 +124,39 @@ def create_support_docs():
|
|
116 |
```
|
117 |
""")
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
with gr.Accordion("π¬ Example Prompts", open=False):
|
120 |
gr.Markdown("""
|
121 |
### Creating Effective Example Prompts
|
@@ -157,36 +198,57 @@ def create_support_docs():
|
|
157 |
```
|
158 |
""")
|
159 |
|
160 |
-
with gr.Accordion("π§ Tool Settings &
|
161 |
gr.Markdown("""
|
162 |
-
###
|
163 |
-
|
164 |
-
**
|
165 |
-
-
|
166 |
-
-
|
167 |
-
-
|
168 |
-
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
-
|
173 |
-
-
|
174 |
-
-
|
175 |
-
|
176 |
-
**URL Grounding
|
177 |
-
-
|
178 |
-
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
**
|
183 |
-
|
184 |
-
|
185 |
-
- **
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
""")
|
191 |
|
192 |
with gr.Accordion("ποΈ Advanced Settings", open=False):
|
|
|
17 |
gr.Markdown("""
|
18 |
### Quick Start Guide
|
19 |
|
20 |
+
**Three-Tab Interface:**
|
21 |
+
1. **Configuration Tab**: Set up your space settings, assistant configuration, and tool integrations
|
22 |
+
2. **Preview Tab**: Test your assistant with real API integration before deployment
|
23 |
+
3. **Support Tab**: Access comprehensive documentation and help (this tab)
|
24 |
+
|
25 |
+
**Workflow Steps:**
|
26 |
+
1. **Configure your Space** in the Configuration tab (space title, description, model selection)
|
27 |
+
2. **Set up Assistant** with system prompt and optional research template
|
28 |
+
3. **Enable Tools** like web search, document RAG, or URL grounding as needed
|
29 |
+
4. **Preview & Test** using the Preview tab to validate your configuration
|
30 |
+
5. **Generate Package** with the "Generate Deployment Package" button
|
31 |
+
6. **Deploy to HuggingFace** following the included README instructions
|
32 |
|
33 |
**Prerequisites:**
|
34 |
- HuggingFace account (free at huggingface.co)
|
|
|
124 |
```
|
125 |
""")
|
126 |
|
127 |
+
with gr.Accordion("π¬ Preview Tab Usage", open=False):
|
128 |
+
gr.Markdown("""
|
129 |
+
### Testing Your Assistant Before Deployment
|
130 |
+
|
131 |
+
The Preview tab provides a sandbox environment to test your assistant with real API integration.
|
132 |
+
|
133 |
+
**How to Use the Preview:**
|
134 |
+
1. **Configure First**: Complete your setup in the Configuration tab
|
135 |
+
2. **Click Preview Button**: Use "Preview Deployment Package" to activate the preview
|
136 |
+
3. **Test Chat Interface**: Interactive chat with your exact configuration
|
137 |
+
4. **Test URL Context**: Add URLs to test grounding functionality
|
138 |
+
5. **Export Conversations**: Save chat logs for analysis
|
139 |
+
|
140 |
+
**Preview Features:**
|
141 |
+
- **Real API Integration**: Uses actual OpenRouter API when `OPENROUTER_API_KEY` is set
|
142 |
+
- **Configuration Display**: Shows your current assistant setup
|
143 |
+
- **URL Testing**: Add up to 4 URLs for context testing
|
144 |
+
- **Dynamic URL Management**: Add/remove URL fields as needed
|
145 |
+
- **Chat Export**: Download conversation logs as markdown files
|
146 |
+
- **Clear Function**: Reset chat history for new tests
|
147 |
+
|
148 |
+
**Preview Requirements:**
|
149 |
+
- Set `OPENROUTER_API_KEY` environment variable for real API testing
|
150 |
+
- Without API key: Shows configuration but no actual chat responses
|
151 |
+
- All other features (URL fetching, configuration) work without API key
|
152 |
+
|
153 |
+
**Testing Best Practices:**
|
154 |
+
- Test different types of queries to validate assistant behavior
|
155 |
+
- Try URL grounding with actual websites to test context integration
|
156 |
+
- Verify that system prompt and model settings work as expected
|
157 |
+
- Export successful conversations to use as examples for documentation
|
158 |
+
""")
|
159 |
+
|
160 |
with gr.Accordion("π¬ Example Prompts", open=False):
|
161 |
gr.Markdown("""
|
162 |
### Creating Effective Example Prompts
|
|
|
198 |
```
|
199 |
""")
|
200 |
|
201 |
+
with gr.Accordion("π§ Tool Settings & Configuration", open=False):
|
202 |
gr.Markdown("""
|
203 |
+
### Configuration Tab Structure
|
204 |
+
|
205 |
+
**Main Configuration Fields** (always visible):
|
206 |
+
- **Space Title**: Display name for your HuggingFace Space
|
207 |
+
- **Space Description**: Brief explanation shown in space listing
|
208 |
+
- **Model Selection**: Choose from optimized OpenRouter models
|
209 |
+
- **API Key Variable**: Secret name for HuggingFace Space settings (default: `OPENROUTER_API_KEY`)
|
210 |
+
- **Access Code**: Optional password protection for student access
|
211 |
+
|
212 |
+
**Assistant Configuration Accordion** (open by default):
|
213 |
+
- **System Prompt**: Main field defining assistant behavior and knowledge
|
214 |
+
- **Research Template**: Pre-configured academic research assistant checkbox
|
215 |
+
- **Web Search Integration**: Enable crawl4ai web search capabilities
|
216 |
+
- **Document RAG**: Upload documents for knowledge base (PDF/DOCX/TXT/MD support)
|
217 |
+
- **URL Grounding**: Add up to 4 static URLs for context (dynamic add/remove)
|
218 |
+
- **Example Prompts**: Clickable suggestions for users (one per line)
|
219 |
+
- **Dynamic URL Fetching**: Hidden field (always enabled) for runtime URL processing
|
220 |
+
|
221 |
+
**Advanced Settings Accordion**:
|
222 |
+
- **Temperature**: Response creativity control (0.0-2.0)
|
223 |
+
- **Max Tokens**: Response length limit (50-4096)
|
224 |
+
|
225 |
+
**Action Buttons**:
|
226 |
+
- **Preview Deployment Package**: Activate Preview tab testing
|
227 |
+
- **Generate Deployment Package**: Create downloadable zip file
|
228 |
+
|
229 |
+
### Tool Integration Options
|
230 |
+
|
231 |
+
**Web Search (crawl4ai)**
|
232 |
+
- Real-time web searching using DuckDuckGo
|
233 |
+
- Advanced content extraction and crawling
|
234 |
+
- Automatically enabled with Research Template
|
235 |
+
|
236 |
+
**Document RAG (Vector Search)**
|
237 |
+
- Upload files: PDF, DOCX, TXT, MD (10MB max each)
|
238 |
+
- Semantic chunking and FAISS vector search
|
239 |
+
- Embedded in deployment package for offline use
|
240 |
+
- Requires `sentence-transformers` and `faiss-cpu`
|
241 |
+
|
242 |
+
**URL Grounding (Static Context)**
|
243 |
+
- Add 2-4 URLs for consistent context across all responses
|
244 |
+
- Content fetched once during generation and cached
|
245 |
+
- Dynamic add/remove buttons for scalable input
|
246 |
+
- Perfect for course syllabi, policies, reference materials
|
247 |
+
|
248 |
+
**Dynamic URL Fetching (Runtime)**
|
249 |
+
- Always enabled - processes URLs mentioned in conversations
|
250 |
+
- Extracts content from user-provided links automatically
|
251 |
+
- Limited to reasonable content size for performance
|
252 |
""")
|
253 |
|
254 |
with gr.Accordion("ποΈ Advanced Settings", open=False):
|