edzynda.eth
10/02/2025, 12:09 PMclass FinancialMetrics {
revenue float @description("Total revenue in millions")
netIncome float @description("Net income in millions")
eps float @description("Earnings per share")
cashFlow float @description("Operating cash flow in millions")
keyHighlights string[] @description("Important highlights or notable events from the report")
risks string[] @description("Key risk factors or challenges mentioned")
quarterEndDate string @description("The date when the quarter ended")
}
function ExtractFinancialData(report: pdf) -> FinancialMetrics {
client "anthropic/claude-sonnet-4-5-latest"
prompt #"
You are a financial analyst. Extract the key financial metrics and important information from this quarterly financial report.
Focus on the most recent quarter's performance and any significant developments.
{{ ctx.output_format }}
{{ _.role("user") }} {{ report }}
"#
}
test FinancialReport {
functions [ExtractFinancialData]
args {
report {
file: "sample.pdf"
}
}
}
But when I run baml-cli test I get this:
❯ baml-cli test
2025-10-02T15:08:20.116 [BAML INFO] Found valid cached BAML library path="/home/space_cowboy/.cache/baml/libs/0.205.0/libbaml_cffi-x86_64-unknown-linux-gnu.so"
2025-10-02T15:08:20.117 [BAML INFO] BAML (v0.205.0) loaded
Summary: 0/1 tests
⠁ Running ExtractFinancialData::FinancialReport 2025-10-02T15:08:20.132 [BAML WARN] Function ExtractFinancialData:
0.01s ERROR ExtractFinancialData::FinancialReport
Failed to read file ./baml_src/: "sample.pdf"
INFO: Test results:
---------------------------------------------------------
function ExtractFinancialData
1 tests (1 🛑)
0.01s ERROR ExtractFinancialData::FinancialReport
./baml_src/report.baml:23
Failed to read file ./baml_src/: "sample.pdf"
---------------------------------------------------------
INFO: Test run completed, 1 tests (1 🛑)edzynda.eth
10/02/2025, 1:44 PMfile: "sample.pdf" should be file "sample.pdf" without the :Antonio Sarosi (BAML 🐑)
10/02/2025, 1:49 PMAntonio Sarosi (BAML 🐑)
10/02/2025, 1:51 PMedzynda.eth
10/02/2025, 2:03 PM