https://www.boundaryml.com logo
🟡 Question about compiling template_strings as Py...
# questions
r
Hi, wanted to check for template_string (prompt snippets) for example: template_string PrintMessages() #" Hello world "# Understand that it gets compiled into inlinedbaml.py (_file_map), was wondering is it possible to have it compiled/saved as a python variable somewhere? Like to compile template_string into python variables, which I can then package it as a base prompt library to be used in other places Current issue I'm facing is that, althogh I can use template_strings in my baml functions / testing which is really useful, I have another use case where I want to store these base prompts in my baml file to be compiled and used in other python functions as well.
v
You’ll want to use the modular API for this! But sadly not directly on prompts, you’ll have to use it with LLM functions only. You should be able to see the raw prompt fully there