Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@
},
"[baml]": {
"editor.defaultFormatter": "Boundary.baml-extension"
},
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
19 changes: 19 additions & 0 deletions engine/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions engine/baml-lib/baml/tests/validation_files/expr/expr_full.baml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,29 @@ client<llm> GPT4o {
test TestMakePoem() {
functions [MakePoem]
args { length 4 }
}

function Search(search_term: string) -> string[] {
client GPT4o
prompt #"
Search for {{ search_term }}
"#
}

function AgentLoop(search_term: string) -> string[] {
let all_terms = [];
let max_terms = 10;
while (all_terms.length < 10 && max_terms > 0) {
let search_results = Search(search_term);
let terms = search_results.filter((result) => {
// ensure each result is a high qualty result and related to the search term
let quality = EnsureQuality(search_term, result);
if (quality.score > 0.5) {
return true;
}
})
all_terms.extend(terms);
max_terms -= 1;
}
all_terms
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ function ModernFunction(x: int) -> int {
};

// Method call
.let result = receipt.calculate();
let result = receipt.calculate();

^if (true) {
if (true) {
return 1;
}

Expand Down
18 changes: 18 additions & 0 deletions engine/baml-lib/type-builder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "baml-type-builder"
version = "0.1.0"
edition = "2021"

[dependencies]
anyhow = "1.0"
baml-types = { path = "../baml-types" }
internal-baml-core = { path = "../baml-core" }
internal-baml-parser-database = { path = "../parser-database" }
internal-baml-diagnostics = { path = "../diagnostics" }
indexmap = { version = "2.0", features = ["serde"] }
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0"

[dev-dependencies]
# Test dependencies
Loading