-
I have a long list of creatures. I want to combine them without spaces or commas or anything. For example - my list has dragon, and dog in it. I want my prompt to read: "dragondog" How do I accomplish this?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Typically, you would do something like
That will give you,
if you want to change the separator from the default
which will produce:
You don't want a space between them though, and this doesn't work: A workaround might be:
or perhaps this would be neater.
You could also try Jinja templates, but the result is a little gross: {% for i in range(10) %}
{% prompt %}
{{ random_sample("{1-2$$dog|dragon|cow|eagle}") | replace(",", "") }}
{% endprompt %}
{% endfor %} The will generate the combinations with a |
Beta Was this translation helpful? Give feedback.
-
Dumb question: If yaml files end in .yaml, and json files end in .json - what is the extension for Jinja2 files? .jinja2? Or does it have to be pasted in the prompt box? |
Beta Was this translation helpful? Give feedback.
Typically, you would do something like
{1-2$$dog|dragon|cow|eagle}
That will give you,
if you want to change the separator from the default
,
you can do this:{1-2$$-$$dog|dragon|cow|eagle}
which will produce:
You don't want a space between them though, and this doesn't work:
{1-2$$$$dog|dragon|cow|eagle}
A workaround might be:
or perhaps this would be neater.
You could also try Jinja templates, but the result is a little gross: