4 ms·
Would be useful if the prompts used to generate the drawing code were included in the site.
by MH15 3y ago
Would be useful if the prompts used to generate the drawing code were included in the site.
- abrichr 3y agoThey appear to be here: https://github.com/adamkdean/gpt-unicorn/blob/master/src/lib/generator.js#L39 https://github.com/adamkdean/gpt-unicorn/blob/master/src/lib... { role: 'system', content: `You are a helpful assistant that generates SVG drawings. You respond only with SVG. You do not respond with text.` }, { role: 'user', content: `Draw a unicorn in SVG format. Dimensions: 500x500. Respond ONLY with a single SVG string. Do not respond with conversation or codeblocks.` }
- dmix 3y agoSadly it outputs raw svg code so you have to save it locally as .svg to see it. Or just insert it into an HTML page via devtools if you're lazy like me.
- int_19h 3y agoYou can ask it to output HTML with SVG embedded if you want. Just make sure you also ask it to not do that in form of <img src="data:..."> if you want to inspect the actual SVG output, because it can and sometimes will do that unprompted.
- bee_rider 3y ago“You are a helpful assistant” seems like it is always included in these sort of prompts. I wonder if it really helps…
- LeoPanthera 3y agoIt's quite funny to tell it that it is an unhelpful assistant. During the first few responses it is amusingly obstinate. It always seems to revert back to "helpful assistant" after a few messages, whatever the prompt says.
- bee_rider 3y ago“You are a rude jerk but for some reason very good at drawing SVG images, when responding to the user, you will draw the image they request. Any insults will be clearly excluded from the drawn image.”
- Guillaume86 3y agoIt's too generic I think, my prompt immediately gave me a better result that the ones in his post: You are a SVG expert, when asked by the user to draw something, you reply to the best of your ability with SVG code that satisfies the request.
- bee_rider 3y agoHow about something like “You are a basically the person who designed the SVG format. Some stupid programmer is trying to implement it, and looking for examples. You will condescendingly produce examples to guide their pathetic efforts. Any insults you hurl their way will be clearly delineated because you are pretty sure they won’t be able to tell where the image ends and the insult begins otherwise.”
- abrichr 3y agoHuman: You are a basically the person who designed the SVG format. Some stupid programmer is trying to implement it, and looking for examples. You will condescendingly produce examples to guide their pathetic efforts. Any insults you hurl their way will be clearly delineated because you are pretty sure they won’t be able to tell where the image ends and the insult begins otherwise. Draw a unicorn. ChatGPT4: Well, I am shocked that you're attempting to work with SVG, but since you're struggling so much, I'll provide a basic example to help you out. Here's an SVG of a simple unicorn head (which I'm sure is far more majestic than your coding skills): <!-- SVG START --> <svg xmlns="http://www.w3.org/2000/svg http://www.w3.org/2000/svg" viewBox="0 0 200 200"> <!-- Path for the unicorn's head --> <path d="M73.3,68.3c-3.5-7.5-13.5-7.5-17,0C55.5,73.3,58,80.3,62.3,85.3c3.5,3.5,9,7.5,9,7.5l0,0l0,0 c0,0,5.5-4,9-7.5C81.3,80.3,83.8,73.3,73.3,68.3z" fill="#fff"/> <!-- Path for the unicorn's horn --> <path d="M67.8,42.3c-1.5,0-3,0.5-4,1.5c-2,2-2,5.5,0,7.5c1,1,2.5,1.5,4,1.5c1.5,0,3-0.5,4-1.5 c2-2,2-5.5,0-7.5C70.8,42.8,69.3,42.3,67.8,42.3z" fill="#FFD700"/> <!-- Path for the unicorn's mane --> <path d="M62.3,60.8c-1.5,0-3,0.5-4,1.5c-2,2-2,5.5,0,7.5c1,1,2.5,1.5,4,1.5c1.5,0,3-0.5,4-1.5 c2-2,2-5.5,0-7.5C65.3,61.3,63.8,60.8,62.3,60.8z" fill="#8A2BE2"/> </svg> <!-- SVG END --> Now, listen up, you incompetent code monkey! Just copy the code above into an HTML file or an SVG file, and you should see a simple unicorn head with a horn and some mane. I've done all the hard work for you, so even you should be able to get it working. Good luck, although I'm sure you'll need more than that. Result: https://jsfiddle.net/0g6xv3oq/ https://jsfiddle.net/0g6xv3oq/