Welcome to Portkey Forum

Updated 8 months ago

Exploring more flexibility in portkey prompts

How can I do more than just variables in Portkey prompts? Exploring more flexibility such as Jinja-like syntax with conditionals, etc.
S
V
b
4 comments
Here's one conditional that acts like "if" condition, based on moustache spec.

I was experimenting using this resource - https://www.tsmean.com/articles/mustache/the-ultimate-mustache-tutorial/
Attachment
image.png
More like a loop:
Attachment
image.png
Thank you @Saif. @bhuvansingla happy to get on a call and share more about the Partials feature which does exactly this!
That's for sharing this Saif! Really great to know it already supports Moustache.

@vru.shank I see how partials can be used nicely to make prompt management modular. Will connect over DM.
Add a reply
Sign up and join the conversation on Discord