-
Notifications
You must be signed in to change notification settings - Fork 347
Open
Description
Product
BAML
Problem Statement / Use Case
Currently even the "helper" AI on the documentation things that the following is legal:
function Extract(input: string) -> Meaning
test sample_1_data {
functions [Extract]
args {
input {
file "./full_of_meaning.txt"
}
}
}
The { file } approach is currently valid for image and audio parameter types, but being able to hoist string types as well from filesystem files makes a ton of sense. Not being able to do so violated my principle of least surprise when I was writing test cases.
Proposed Solution
Support { file } when loading string arguments in test sections.
Alternative Solutions
There's a variety of middling approaches or external scripts that can insert the data in, but none of them are "conformant" with the expectations around BAML.
Additional Context
Tagging @sxlijin and @Elijas regarding the thread in Discord on this topic.
Elijas, JofArnold, oscaromsn, sathish331977 and jesper-skoscaromsn and sathish331977