https://www.boundaryml.com logo
🟡 Migrating Python prompts to BAML file
# questions
h
Currently our python backend has a ton of prompts in the code. I would like to migrate these prompts to BAML, but would prefer not copy / pasting them into a .baml file. Is there a way we can import these prompts into a .baml file?
v
sadly there's no trivial way to import python code into baml code 🙁 What you can do to make life easier is use https://www.boundaryml.com/chat to do the porting for you!
the reason we can't import python -> BAML is because BAML works in every language (ts + Go for example), and then imports would break in those scenarios.
h
is there a way to import txt -> BAML?
v
not yet 🙁 How are your prompts stored by chance? can you share directory structure?
and perhaps a sample prompt?
h
unfortunately can't share the exact structure but i can make a mock
v
(e.g. do your existing prompts have variables?)
also can hop on office hours and chat if that would be faster?
h
sure!
v
just joined