nsarrazin commited on
Commit
2335377
·
1 Parent(s): b7217a0

feat: rework example layout to work better on mobile

Browse files
.env CHANGED
@@ -35,13 +35,13 @@ MODELS=`[
35
  "description": "Nous Research's latest Hermes 3 release in 8B size.",
36
  "promptExamples": [
37
  {
38
- "title": "Write an email from bullet list",
39
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
40
  }, {
41
- "title": "Code a snake game",
42
  "prompt": "Code a basic snake game in python, give explanations for each step."
43
  }, {
44
- "title": "Assist in a task",
45
  "prompt": "How do I make a delicious lemon cheesecake?"
46
  }
47
  ]
 
35
  "description": "Nous Research's latest Hermes 3 release in 8B size.",
36
  "promptExamples": [
37
  {
38
+ "title": "Write an email",
39
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
40
  }, {
41
+ "title": "Code a game",
42
  "prompt": "Code a basic snake game in python, give explanations for each step."
43
  }, {
44
+ "title": "Recipe help",
45
  "prompt": "How do I make a delicious lemon cheesecake?"
46
  }
47
  ]
README.md CHANGED
@@ -282,13 +282,13 @@ MODELS=`[
282
  },
283
  "promptExamples": [
284
  {
285
- "title": "Write an email from bullet list",
286
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
287
  }, {
288
- "title": "Code a snake game",
289
  "prompt": "Code a basic snake game in python, give explanations for each step."
290
  }, {
291
- "title": "Assist in a task",
292
  "prompt": "How do I make a delicious lemon cheesecake?"
293
  }
294
  ]
 
282
  },
283
  "promptExamples": [
284
  {
285
+ "title": "Write an email",
286
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
287
  }, {
288
+ "title": "Code a game",
289
  "prompt": "Code a basic snake game in python, give explanations for each step."
290
  }, {
291
+ "title": "Recipe help",
292
  "prompt": "How do I make a delicious lemon cheesecake?"
293
  }
294
  ]
chart/env/prod.yaml CHANGED
@@ -62,15 +62,15 @@ envVars:
62
  },
63
  "promptExamples": [
64
  {
65
- "title": "Write an email from bullet list",
66
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
67
  },
68
  {
69
- "title": "Code a snake game",
70
  "prompt": "Code a basic snake game in python, give explanations for each step."
71
  },
72
  {
73
- "title": "Assist in a task",
74
  "prompt": "How do I make a delicious lemon cheesecake?"
75
  }
76
  ]
@@ -91,15 +91,15 @@ envVars:
91
  "tools": true,
92
  "promptExamples": [
93
  {
94
- "title": "Write an email from bullet list",
95
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
96
  },
97
  {
98
- "title": "Code a snake game",
99
  "prompt": "Code a basic snake game in python, give explanations for each step."
100
  },
101
  {
102
- "title": "Assist in a task",
103
  "prompt": "How do I make a delicious lemon cheesecake?"
104
  }
105
  ]
@@ -119,15 +119,15 @@ envVars:
119
  },
120
  "promptExamples": [
121
  {
122
- "title": "Generate a mouse portrait",
123
  "prompt": "Generate the portrait of a scientific mouse in its laboratory."
124
  },
125
  {
126
- "title": "Review a pull request",
127
  "prompt": "Review this pull request: https://github.com/huggingface/chat-ui/pull/1131/files"
128
  },
129
  {
130
- "title": "Code a snake game",
131
  "prompt": "Code a basic snake game in python, give explanations for each step."
132
  }
133
  ]
@@ -193,7 +193,7 @@ envVars:
193
  "endpoints": [
194
  {
195
  "type": "openai",
196
- "baseURL": "https://internal.api-inference.huggingface.co/models/nvidia/Llama-3.1-Nemotron-70B-Instruct-HF/v1"
197
  }
198
  ]
199
  },
@@ -245,7 +245,7 @@ envVars:
245
  },
246
  "promptExamples": [
247
  {
248
- "title": "To-do list web app",
249
  "prompt": "Create a simple to-do list application where users can:\n- Add new tasks.\n- Mark tasks as complete.\n- Delete completed tasks.\nThe tasks should persist in the browser's local storage so that they remain available even after a page reload.\n"
250
  },
251
  {
@@ -272,15 +272,15 @@ envVars:
272
  "websiteUrl": "https://blog.google/technology/developers/gemma-3/",
273
  "promptExamples": [
274
  {
275
- "title": "Write an email from bullet list",
276
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
277
  },
278
  {
279
- "title": "Code a snake game",
280
  "prompt": "Code a basic snake game in python, give explanations for each step."
281
  },
282
  {
283
- "title": "Assist in a task",
284
  "prompt": "How do I make a delicious lemon cheesecake?"
285
  }
286
  ],
@@ -314,15 +314,15 @@ envVars:
314
  },
315
  "promptExamples": [
316
  {
317
- "title": "Write an email from bullet list",
318
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
319
  },
320
  {
321
- "title": "Code a snake game",
322
  "prompt": "Code a basic snake game in python, give explanations for each step."
323
  },
324
  {
325
- "title": "Assist in a task",
326
  "prompt": "How do I make a delicious lemon cheesecake?"
327
  }
328
  ],
@@ -350,15 +350,15 @@ envVars:
350
  "modelUrl": "https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B",
351
  "promptExamples": [
352
  {
353
- "title": "Write an email from bullet list",
354
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
355
  },
356
  {
357
- "title": "Code a snake game",
358
  "prompt": "Code a basic snake game in python, give explanations for each step."
359
  },
360
  {
361
- "title": "Assist in a task",
362
  "prompt": "How do I make a delicious lemon cheesecake?"
363
  }
364
  ],
@@ -385,15 +385,15 @@ envVars:
385
  },
386
  "promptExamples": [
387
  {
388
- "title": "Write an email from bullet list",
389
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
390
  },
391
  {
392
- "title": "Code a snake game",
393
  "prompt": "Code a basic snake game in python, give explanations for each step."
394
  },
395
  {
396
- "title": "Assist in a task",
397
  "prompt": "How do I make a delicious lemon cheesecake?"
398
  }
399
  ]
@@ -413,15 +413,15 @@ envVars:
413
  },
414
  "promptExamples": [
415
  {
416
- "title": "Write an email from bullet list",
417
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
418
  },
419
  {
420
- "title": "Code a snake game",
421
  "prompt": "Code a basic snake game in python, give explanations for each step."
422
  },
423
  {
424
- "title": "Assist in a task",
425
  "prompt": "How do I make a delicious lemon cheesecake?"
426
  }
427
  ]
 
62
  },
63
  "promptExamples": [
64
  {
65
+ "title": "Write an email",
66
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
67
  },
68
  {
69
+ "title": "Code a game",
70
  "prompt": "Code a basic snake game in python, give explanations for each step."
71
  },
72
  {
73
+ "title": "Recipe help",
74
  "prompt": "How do I make a delicious lemon cheesecake?"
75
  }
76
  ]
 
91
  "tools": true,
92
  "promptExamples": [
93
  {
94
+ "title": "Write an email",
95
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
96
  },
97
  {
98
+ "title": "Code a game",
99
  "prompt": "Code a basic snake game in python, give explanations for each step."
100
  },
101
  {
102
+ "title": "Recipe help",
103
  "prompt": "How do I make a delicious lemon cheesecake?"
104
  }
105
  ]
 
119
  },
120
  "promptExamples": [
121
  {
122
+ "title": "Generate image",
123
  "prompt": "Generate the portrait of a scientific mouse in its laboratory."
124
  },
125
  {
126
+ "title": "Review code",
127
  "prompt": "Review this pull request: https://github.com/huggingface/chat-ui/pull/1131/files"
128
  },
129
  {
130
+ "title": "Code a game",
131
  "prompt": "Code a basic snake game in python, give explanations for each step."
132
  }
133
  ]
 
193
  "endpoints": [
194
  {
195
  "type": "openai",
196
+ "baseURL": "https://internalRs in strawberry.api-inference.huggingface.co/models/nvidia/Llama-3.1-Nemotron-70B-Instruct-HF/v1"
197
  }
198
  ]
199
  },
 
245
  },
246
  "promptExamples": [
247
  {
248
+ "title": "Build a webapp",
249
  "prompt": "Create a simple to-do list application where users can:\n- Add new tasks.\n- Mark tasks as complete.\n- Delete completed tasks.\nThe tasks should persist in the browser's local storage so that they remain available even after a page reload.\n"
250
  },
251
  {
 
272
  "websiteUrl": "https://blog.google/technology/developers/gemma-3/",
273
  "promptExamples": [
274
  {
275
+ "title": "Write an email",
276
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
277
  },
278
  {
279
+ "title": "Code a game",
280
  "prompt": "Code a basic snake game in python, give explanations for each step."
281
  },
282
  {
283
+ "title": "Recipe help",
284
  "prompt": "How do I make a delicious lemon cheesecake?"
285
  }
286
  ],
 
314
  },
315
  "promptExamples": [
316
  {
317
+ "title": "Write an email",
318
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
319
  },
320
  {
321
+ "title": "Code a game",
322
  "prompt": "Code a basic snake game in python, give explanations for each step."
323
  },
324
  {
325
+ "title": "Recipe help",
326
  "prompt": "How do I make a delicious lemon cheesecake?"
327
  }
328
  ],
 
350
  "modelUrl": "https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B",
351
  "promptExamples": [
352
  {
353
+ "title": "Write an email",
354
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
355
  },
356
  {
357
+ "title": "Code a game",
358
  "prompt": "Code a basic snake game in python, give explanations for each step."
359
  },
360
  {
361
+ "title": "Recipe help",
362
  "prompt": "How do I make a delicious lemon cheesecake?"
363
  }
364
  ],
 
385
  },
386
  "promptExamples": [
387
  {
388
+ "title": "Write an email",
389
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
390
  },
391
  {
392
+ "title": "Code a game",
393
  "prompt": "Code a basic snake game in python, give explanations for each step."
394
  },
395
  {
396
+ "title": "Recipe help",
397
  "prompt": "How do I make a delicious lemon cheesecake?"
398
  }
399
  ]
 
413
  },
414
  "promptExamples": [
415
  {
416
+ "title": "Write an email",
417
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
418
  },
419
  {
420
+ "title": "Code a game",
421
  "prompt": "Code a basic snake game in python, give explanations for each step."
422
  },
423
  {
424
+ "title": "Recipe help",
425
  "prompt": "How do I make a delicious lemon cheesecake?"
426
  }
427
  ]
docs/source/configuration/models/overview.md CHANGED
@@ -22,13 +22,13 @@ MODELS=`[
22
  },
23
  "promptExamples": [
24
  {
25
- "title": "Write an email from bullet list",
26
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
27
  }, {
28
- "title": "Code a snake game",
29
  "prompt": "Code a basic snake game in python, give explanations for each step."
30
  }, {
31
- "title": "Assist in a task",
32
  "prompt": "How do I make a delicious lemon cheesecake?"
33
  }
34
  ]
 
22
  },
23
  "promptExamples": [
24
  {
25
+ "title": "Write an email",
26
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
27
  }, {
28
+ "title": "Code a game",
29
  "prompt": "Code a basic snake game in python, give explanations for each step."
30
  }, {
31
+ "title": "Recipe help",
32
  "prompt": "How do I make a delicious lemon cheesecake?"
33
  }
34
  ]
docs/source/configuration/models/providers/tgi.md CHANGED
@@ -31,13 +31,13 @@ MODELS=`[
31
  },
32
  "promptExamples": [
33
  {
34
- "title": "Write an email from bullet list",
35
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
36
  }, {
37
- "title": "Code a snake game",
38
  "prompt": "Code a basic snake game in python, give explanations for each step."
39
  }, {
40
- "title": "Assist in a task",
41
  "prompt": "How do I make a delicious lemon cheesecake?"
42
  }
43
  ]
 
31
  },
32
  "promptExamples": [
33
  {
34
+ "title": "Write an email",
35
  "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
36
  }, {
37
+ "title": "Code a game",
38
  "prompt": "Code a basic snake game in python, give explanations for each step."
39
  }, {
40
+ "title": "Recipe help",
41
  "prompt": "How do I make a delicious lemon cheesecake?"
42
  }
43
  ]
src/lib/components/chat/ChatIntroduction.svelte CHANGED
@@ -78,18 +78,21 @@
78
  </div>
79
  {#if currentModel.promptExamples}
80
  <div class="lg:col-span-3 lg:mt-6">
81
- <p class="mb-3 text-gray-600 dark:text-gray-300">Examples</p>
82
- <div class="grid gap-3 lg:grid-cols-3 lg:gap-5">
 
 
83
  {#each currentModel.promptExamples as example}
84
  <button
85
  type="button"
86
- class="rounded-xl border bg-gray-50 p-3 text-gray-600 hover:bg-gray-100 dark:border-gray-800 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 max-xl:text-sm xl:p-3.5"
87
  onclick={() => dispatch("message", example.prompt)}
88
  >
89
  {example.title}
90
  </button>
91
  {/each}
92
  </div>
93
- </div>{/if}
 
94
  <div class="h-40 sm:h-24"></div>
95
  </div>
 
78
  </div>
79
  {#if currentModel.promptExamples}
80
  <div class="lg:col-span-3 lg:mt-6">
81
+ <p class="mb-3 text-center text-gray-600 dark:text-gray-300 lg:text-left">Examples</p>
82
+ <div
83
+ class="flex max-h-60 gap-2 overflow-x-auto pb-2 text-center scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-700 lg:grid lg:grid-cols-3 lg:overflow-y-auto lg:text-left"
84
+ >
85
  {#each currentModel.promptExamples as example}
86
  <button
87
  type="button"
88
+ class="flex-shrink-0 rounded-xl border bg-gray-50 p-2.5 text-sm text-gray-600 hover:bg-gray-100 dark:border-gray-800 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-700 sm:p-3 lg:w-full xl:p-3.5 xl:text-base"
89
  onclick={() => dispatch("message", example.prompt)}
90
  >
91
  {example.title}
92
  </button>
93
  {/each}
94
  </div>
95
+ </div>
96
+ {/if}
97
  <div class="h-40 sm:h-24"></div>
98
  </div>