From discord thread:
- Read directly from the
.baml file and construct a cognify.StructuredModel for each function.
- Generate our own client interface. Essentially, when running
$ cognify optimize, we'd generate a file that initializes all relevant cognify.StructuredModels and also a function for each that does 2 things: (1) calls the model using Cognify's interface (2) parses the output using BAML. This relies on the BAML community exposing an API for just the parser
- In the user's code, replace calls to the BAML client with calls to the cognify-generated interface.
Additionally, a feature that is not BAML-specific but would still be needed here is support in cognify.Model for constructing messages from jinja templates (#24)
From discord thread:
.bamlfile and construct acognify.StructuredModelfor each function.$ cognify optimize, we'd generate a file that initializes all relevantcognify.StructuredModels and also a function for each that does 2 things: (1) calls the model using Cognify's interface (2) parses the output using BAML. This relies on the BAML community exposing an API for just the parserAdditionally, a feature that is not BAML-specific but would still be needed here is support in
cognify.Modelfor constructing messages from jinja templates (#24)