|
69 | 69 | }} |
70 | 70 | {template} |
71 | 71 | /> |
72 | | -<Story |
73 | | - name="Chatbot with math disabled, small height" |
74 | | - args={{ |
75 | | - latex_delimiters: [], |
76 | | - height: 200, |
77 | | - show_copy_button: false, |
78 | | - value: defaultValue |
79 | | - }} |
80 | | - {template} |
81 | | -/> |
82 | | -<Story |
83 | | - name="Chatbot with math disabled, small max_height" |
84 | | - args={{ latex_delimiters: [], max_height: 200, value: defaultValue }} |
85 | | - {template} |
86 | | -/> |
87 | 72 | <Story |
88 | 73 | name="Chatbot with text rendered right-to-left" |
89 | 74 | args={{ |
|
166 | 151 | }} |
167 | 152 | {template} |
168 | 153 | /> |
169 | | -<Story |
170 | | - name="Chatbot with headers and lists" |
171 | | - args={{ |
172 | | - value: [ |
173 | | - { |
174 | | - role: "user", |
175 | | - content: [ |
176 | | - { |
177 | | - type: "text", |
178 | | - text: "# Markdown Example\n\nThis document is a showcase of various Markdown capabilities." |
179 | | - } |
180 | | - ] |
181 | | - }, |
182 | | - { |
183 | | - role: "assistant", |
184 | | - content: [ |
185 | | - { |
186 | | - type: "text", |
187 | | - text: "## Table of Contents\n\n1. [Text Formatting](#text-formating)\n2. [Code Blocks](#code-blocks)\n3. [Tables](#tables)" |
188 | | - } |
189 | | - ] |
190 | | - } |
191 | | - ] |
192 | | - }} |
193 | | - {template} |
194 | | -/> |
195 | | -<Story |
196 | | - name="Chatbot with tables and nested lists" |
197 | | - args={{ |
198 | | - value: [ |
199 | | - { |
200 | | - role: "user", |
201 | | - content: [ |
202 | | - { |
203 | | - type: "text", |
204 | | - text: "Creating tables in Markdown is straightforward:\n\n| Header 1 | Header 2 | Header 3 |\n|----------|----------|----------|\n| Row 1, Cell 1 | Row 1, Cell 2 | Row 1, Cell 3 |\n| Row 2, Cell 1 | Row 2, Cell 2 | Row 2, Cell 3 |\n| Row 3, Cell 1 | Row 3, Cell 2 | Row 3, Cell 3 |" |
205 | | - } |
206 | | - ] |
207 | | - }, |
208 | | - { |
209 | | - role: "assistant", |
210 | | - content: [ |
211 | | - { |
212 | | - type: "text", |
213 | | - text: "### Unordered List\n\n- Item 1\n- Item 2\n - Subitem 2.1\n - Subitem 2.2\n- Item 3\n\n### Ordered List\n\n1. First Item\n2. Second Item\n 1. Subitem 2.1\n 2. Subitem 2.2\n3. Third Item" |
214 | | - } |
215 | | - ] |
216 | | - } |
217 | | - ] |
218 | | - }} |
219 | | - {template} |
220 | | -/> |
221 | | -<Story |
222 | | - name="Chatbot with image in markdown" |
223 | | - args={{ |
224 | | - value: [ |
225 | | - { |
226 | | - role: "user", |
227 | | - content: [ |
228 | | - { |
229 | | - type: "text", |
230 | | - text: `` |
231 | | - } |
232 | | - ] |
233 | | - } |
234 | | - ] |
235 | | - }} |
236 | | - {template} |
237 | | -/> |
238 | 154 | <Story |
239 | 155 | name="Uploaded text files" |
240 | 156 | args={{ |
|
399 | 315 | }} |
400 | 316 | {template} |
401 | 317 | /> |
402 | | -<Story |
403 | | - name="Consecutive messages not grouped in same bubble" |
404 | | - args={{ |
405 | | - type: "messages", |
406 | | - display_consecutive_in_same_bubble: false, |
407 | | - value: [ |
408 | | - { role: "user", content: [{ type: "text", text: "Show me the file." }] }, |
409 | | - { |
410 | | - role: "user", |
411 | | - content: [{ type: "text", text: "Second user message" }] |
412 | | - }, |
413 | | - { |
414 | | - role: "assistant", |
415 | | - content: [{ type: "text", text: "Here is the file you requested" }] |
416 | | - }, |
417 | | - { |
418 | | - role: "assistant", |
419 | | - content: [ |
420 | | - { |
421 | | - type: "file", |
422 | | - file: { path: "abc/qwerty.txt", url: "" }, |
423 | | - alt_text: null |
424 | | - } |
425 | | - ] |
426 | | - } |
427 | | - ] |
428 | | - }} |
429 | | - {template} |
430 | | -/> |
431 | | -<Story |
432 | | - name="Chatbot with examples (not multimodal)" |
433 | | - args={{ |
434 | | - value: [], |
435 | | - examples: [ |
436 | | - { text: "What is machine learning?" }, |
437 | | - { |
438 | | - text: "Analyze this image", |
439 | | - files: [ |
440 | | - { |
441 | | - mime_type: "image/jpeg", |
442 | | - url: bus, |
443 | | - orig_name: "bus.png" |
444 | | - } |
445 | | - ] |
446 | | - }, |
447 | | - { |
448 | | - text: "Process this document", |
449 | | - files: [ |
450 | | - { |
451 | | - mime_type: "application/pdf", |
452 | | - url: "/document.pdf", |
453 | | - orig_name: "document.pdf" |
454 | | - } |
455 | | - ] |
456 | | - } |
457 | | - ] |
458 | | - }} |
459 | | - {template} |
460 | | -/> |
461 | 318 | <Story |
462 | 319 | name="Displaying Tool Message" |
463 | 320 | args={{ |
|
0 commit comments