Skip to content

BAML Parsing/Display integration #43

@darinkishore

Description

@darinkishore

The goal is to allow using Rust's type system to express signature input/outputfields properly, by shelling out to BAML's parsing layer and creating a subcrate for the

  • parsing from JsonISH
  • display to final LLM prompt

using the actual code from BAML .

complexity lies in separating out the different parts of BAML and extracting just what we need, and figuring out the right derive macro that intersects with Signature Input/OutputFields in order to display + parse.

Note that for outputfield parsing from JSON, we would likely have to maintain some representation of the conversation between the rust w/baml derive types and which outputfield it corresponds to at parse time.

Fine with mucking with crate internals and ok with POSSIBLY creating more coupling to signature if really necessary.

ChatGPT Design Reference: https://chatgpt.com/s/t_695c601ee6a481919f66bf3db45b9df4

Full thread: https://chatgpt.com/share/695c5ea0-226c-800e-84b7-f9c9e2215a0a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions