character-ai / prompt-poet

Streamlines and simplifies prompt design for both developers and non-technical users with a low code approach.
https://pypi.org/project/prompt-poet/
MIT License
933 stars 78 forks source link

TypeError: no loader for this environment specified #18

Open 0xmihutao opened 3 months ago

0xmihutao commented 3 months ago

I get this error when I try to initialize a Prompt from a raw template that contains {% include '...' %}, but I don't get this when I have the exact same contents in a file and I try to initialize a Prompt object via file path instead.

nitinimage commented 3 months ago

Use 'template_path' parameter instead of 'raw_template'.

0xmihutao commented 3 months ago

yes I know, but my complaint is that it shouldn't be the case that I have to load it from a file. My use case is in passing a template through an API endpoint, but now I have to write it to a temporary file and pass it in via template_path which is not desirable