https://www.boundaryml.com logo
🟑 Inquiry about using parser (SAP) with Typescrip...
# questions
m
Hi! I was interested on the parser you wrote (SAP) to parse correctly from llm output but don't want to use BAML language altogether, do you expose this parser directly to call it from Typescript for example? Or the only way to use it is through the whole package of BAML files?
v
Yep! Check out our modular api. Since it’s heavily tied to the type system
b
and our type system is specifically designed for prompting in ways that are not 1:1 mappable onto zod https://docs.boundaryml.com/ref/attributes/alias https://docs.boundaryml.com/ref/attributes/description
m
Thanks for quick response! Okay, so, could I just use the BAML file to declare a
Resume
class, make a ghost function
ExtractResume
which returns that class and only use the
b.parse.ExtractResume
for the LLM response? And in the prompt keep using the type definition pattern I use now (as suggested in this Boundary blog post: https://boundaryml.com/blog/type-definition-prompting-baml#example-1-comparing-type-defintions-to-json-schema)
b
yep!
v
You can also use the modular api to get the generated prompt out as well
b.request.ExtractResume