Skip to content

[Frontend] BAML Support #25

@reyna-abhyankar

Description

@reyna-abhyankar

From discord thread:

  1. Read directly from the .baml file and construct a cognify.StructuredModel for each function.
  2. 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
  3. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions