Skip to content

Commit

Permalink
Refactor how clients are parsed for more accurate and consistent erro…
Browse files Browse the repository at this point in the history
…r handling (#1026)

Prior we had a lot of duplicated code for parsing args which caused some
confusion. Adding new error handing logic in.

Included some new tests which ensure prompt-fiddle and baml-cli init
sample code always passes without any warnings!
Python library static analysis fixes. (0 errors now!)
  • Loading branch information
hellovai authored Nov 10, 2024
1 parent 8100df9 commit c6b1167
Show file tree
Hide file tree
Showing 30 changed files with 1,350 additions and 1,408 deletions.
1 change: 1 addition & 0 deletions docs/old/docs/snippets/clients/providers/groq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ client<llm> MyClient {
base_url "https://api.groq.com/openai/v1"
api_key env.GROQ_API_KEY
model "llama3-70b-8192"
default_role "user"
}
}
```
2 changes: 2 additions & 0 deletions docs/old/docs/snippets/clients/providers/openai-generic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ client<llm> MyClient {

</ParamField>

<Markdown src="../../../../snippets/allowed-role-metadata-basic.mdx" />

## Forwarded options

<ParamField
Expand Down
1 change: 1 addition & 0 deletions engine/baml-lib/baml/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fn build_folder_tests(dir: &'static str, out_file_name: &str) {
println!("cargo:rerun-if-changed={dir}");
let mut all_schemas = Vec::new();
find_all_schemas("", &mut all_schemas, dir);
all_schemas.sort();

// concatenate all the files in the directory into a single file
let mut out_file = fs::File::create(format!("{CARGO_MANIFEST_DIR}/{out_file_name}")).unwrap();
Expand Down
Loading

0 comments on commit c6b1167

Please sign in to comment.