milwright commited on
Commit
4dbfc5c
Β·
verified Β·
1 Parent(s): ebd9ae2

Update support_docs.py

Browse files
Files changed (1) hide show
  1. support_docs.py +32 -83
support_docs.py CHANGED
@@ -52,9 +52,9 @@ def create_support_docs():
52
  ### System Prompt & Templates
53
 
54
  **Templates (Easy Start):**
 
55
  - **Research Template** - Academic work, citations, fact-checking
56
  - **Socratic Template** - Teaching through questions, critical thinking
57
- - **Custom** - Write your own (advanced)
58
 
59
  **Tips:**
60
  - Be clear about the assistant's role
@@ -62,35 +62,6 @@ def create_support_docs():
62
  - Define specific behavior and tone
63
  """)
64
 
65
- with gr.Accordion("πŸ”¬ Preview Tab Usage", open=False):
66
- gr.Markdown("""
67
- ### Testing Before Deployment
68
-
69
- **Preview Features:**
70
- - Real API integration
71
- - Configuration display
72
- - URL testing (up to 4 URLs)
73
- - Chat export
74
- - Clear function
75
-
76
- **Preview Steps:**
77
- 1. Complete Configuration tab setup
78
- 2. Click "Preview Deployment Package"
79
- 3. Test chat interface
80
- 4. Test URL grounding
81
- 5. Export conversations for analysis
82
-
83
- **Requirements:**
84
- - Set `OPENROUTER_API_KEY` environment variable
85
- - Without API key: shows configuration only
86
-
87
- **Best Practices:**
88
- - Test various query types
89
- - Verify URL grounding works
90
- - Confirm system prompt behavior
91
- - Export successful conversations
92
- """)
93
-
94
  with gr.Accordion("πŸ’¬ Example Prompts", open=False):
95
  gr.Markdown("""
96
  ### Quick Start Examples
@@ -110,16 +81,9 @@ def create_support_docs():
110
  Help me fact-check this claim
111
  What citation format should I use?
112
  ```
113
-
114
- **Study Helper:**
115
- ```
116
- Quiz me on chapter 5 concepts
117
- Explain this problem step-by-step
118
- Help me create a study plan
119
- ```
120
  """)
121
 
122
- with gr.Accordion("πŸ”§ Tool Settings & Configuration", open=False):
123
  gr.Markdown("""
124
  ### Configuration Structure
125
 
@@ -142,12 +106,7 @@ def create_support_docs():
142
  **URL Grounding (Static)**
143
  - 2-4 URLs for consistent context
144
  - Content cached during generation
145
- - Perfect for syllabi, policies, references
146
-
147
- **Dynamic URL Fetching**
148
- - Always enabled
149
- - Processes URLs in conversations
150
- - Limited content size for performance
151
  """)
152
 
153
  with gr.Accordion("πŸŽ›οΈ Advanced Settings", open=False):
@@ -171,6 +130,35 @@ def create_support_docs():
171
  - URLs increase input tokens
172
  - Consider costs with high limits
173
  """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
 
175
  with gr.Accordion("πŸš€ Deployment Process", open=False):
176
  gr.Markdown("""
@@ -249,11 +237,6 @@ def create_support_docs():
249
  - Wait a few minutes before trying again
250
  - Consider upgrading OpenRouter plan for higher limits
251
 
252
- **Assistant not responding**
253
- - Check browser console for JavaScript errors
254
- - Verify model name is correct and available
255
- - Test with simple prompts first
256
-
257
  **Access code not working**
258
  - Verify `SPACE_ACCESS_CODE` secret is set correctly
259
  - Check for typos in the access code
@@ -265,40 +248,6 @@ def create_support_docs():
265
  - Verify dynamic URL fetching is enabled if needed
266
  """)
267
 
268
- with gr.Accordion("πŸ’‘ Best Practices", open=False):
269
- gr.Markdown("""
270
- ### Optimization Tips
271
-
272
- **Performance**
273
- - Use appropriate model
274
- - Set reasonable token limits
275
- - Cache static content with URL grounding
276
-
277
- **User Experience**
278
- - Write clear example prompts
279
- - Include usage instructions
280
- - Test thoroughly before sharing
281
- - Provide clear access instructions
282
-
283
- **Security**
284
- - Never include API keys in code
285
- - Use environment variables for secrets
286
- - Set appropriate access controls
287
- - Monitor usage and costs
288
-
289
- **Maintenance**
290
- - Check for model updates
291
- - Monitor feedback and usage
292
- - Update grounding URLs
293
- - Keep documentation current
294
-
295
- **Cost Management**
296
- - Start with lower token limits
297
- - Monitor OpenRouter dashboard
298
- - Set usage alerts
299
- - Educate efficient prompting
300
- """)
301
-
302
  with gr.Accordion("πŸ“š Additional Resources", open=False):
303
  gr.Markdown("""
304
  ### Helpful Links
 
52
  ### System Prompt & Templates
53
 
54
  **Templates (Easy Start):**
55
+ - **Custom** - Write your own
56
  - **Research Template** - Academic work, citations, fact-checking
57
  - **Socratic Template** - Teaching through questions, critical thinking
 
58
 
59
  **Tips:**
60
  - Be clear about the assistant's role
 
62
  - Define specific behavior and tone
63
  """)
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  with gr.Accordion("πŸ’¬ Example Prompts", open=False):
66
  gr.Markdown("""
67
  ### Quick Start Examples
 
81
  Help me fact-check this claim
82
  What citation format should I use?
83
  ```
 
 
 
 
 
 
 
84
  """)
85
 
86
+ with gr.Accordion("πŸ”§ Settings & Configuration", open=False):
87
  gr.Markdown("""
88
  ### Configuration Structure
89
 
 
106
  **URL Grounding (Static)**
107
  - 2-4 URLs for consistent context
108
  - Content cached during generation
109
+ - Great for syllabi, policies, references
 
 
 
 
 
110
  """)
111
 
112
  with gr.Accordion("πŸŽ›οΈ Advanced Settings", open=False):
 
130
  - URLs increase input tokens
131
  - Consider costs with high limits
132
  """)
133
+
134
+ with gr.Accordion("πŸ”¬ Preview Tab Usage", open=False):
135
+ gr.Markdown("""
136
+ ### Testing Before Deployment
137
+
138
+ **Preview Features:**
139
+ - Real API integration
140
+ - Configuration display
141
+ - URL testing (up to 4 URLs)
142
+ - Chat export
143
+ - Clear function
144
+
145
+ **Preview Steps:**
146
+ 1. Complete Configuration tab setup
147
+ 2. Click "Preview Deployment Package"
148
+ 3. Test chat interface
149
+ 4. Test URL grounding
150
+ 5. Export conversations for analysis
151
+
152
+ **Requirements:**
153
+ - Set `OPENROUTER_API_KEY` environment variable
154
+ - Without API key: shows configuration only
155
+
156
+ **Best Practices:**
157
+ - Test various query types
158
+ - Verify URL grounding works
159
+ - Confirm system prompt behavior
160
+ - Export conversations as documentation
161
+ """)
162
 
163
  with gr.Accordion("πŸš€ Deployment Process", open=False):
164
  gr.Markdown("""
 
237
  - Wait a few minutes before trying again
238
  - Consider upgrading OpenRouter plan for higher limits
239
 
 
 
 
 
 
240
  **Access code not working**
241
  - Verify `SPACE_ACCESS_CODE` secret is set correctly
242
  - Check for typos in the access code
 
248
  - Verify dynamic URL fetching is enabled if needed
249
  """)
250
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  with gr.Accordion("πŸ“š Additional Resources", open=False):
252
  gr.Markdown("""
253
  ### Helpful Links