milwright commited on
Commit
dc5c13f
Β·
1 Parent(s): d01e9d0

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

Files changed (1) hide show
  1. 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
- 1. **Configure your Space** in the main Configuration tab
21
- 2. **Preview your assistant** using the Preview button
22
- 3. **Generate deployment package** with the Generate button
23
- 4. **Deploy to HuggingFace Spaces** following the README instructions
 
 
 
 
 
 
 
 
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 & Grounding", open=False):
161
  gr.Markdown("""
162
- ### Tool Configuration Options
163
-
164
- **Dynamic URL Fetching**
165
- - Allows assistant to fetch content from URLs mentioned in conversations
166
- - Useful for research and fact-checking tasks
167
- - Automatically extracts text content from web pages
168
- - Limited to 3 URLs per message for performance
169
-
170
- **Document RAG (Retrieval-Augmented Generation)**
171
- - Upload PDF, DOCX, TXT, or MD files as knowledge base
172
- - Assistant can search and reference uploaded documents
173
- - Perfect for course materials, policies, or reference documents
174
- - Files are embedded in your deployment package
175
-
176
- **URL Grounding**
177
- - Add up to 4 URLs that provide static context
178
- - Content is fetched once and included in every response
179
- - Great for course syllabi, institutional policies, or reference materials
180
- - Content is cached to avoid repeated fetching
181
-
182
- **When to Use Each:**
183
- - **Static URLs**: Course policies, syllabi, reference materials
184
- - **Dynamic URLs**: Research tasks where students provide links
185
- - **Document RAG**: Large document collections, textbooks, course readers
186
-
187
- **File Size Limits:**
188
- - Individual files: 10MB maximum
189
- - Total RAG package: Recommended under 50MB for deployment
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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):