Closed villagab4 closed 2 months ago
To resolve the issue with default_client_mode
not being recognized in the generator, follow these steps:
Update the BAML CLI and VSCode Extension: Ensure both the BAML CLI and the VSCode extension are updated to the latest version.
Modify the Generator Definition: Update the generator definition to include default_client_mode
as shown below:
// Example for Python
generator target {
output_type "python/pydantic"
output_dir "../"
default_client_mode "sync"
version "0.51.0"
}
// Example for TypeScript
generator target {
output_type "typescript"
output_dir "../"
default_client_mode "async"
version "0.51.0"
}
/engine/baml-lib/baml/tests/validation_files/generators/error.baml
for examples of common errors and their fixes./docs/docs/calling-baml/generate-baml-client.mdx /typescript/vscode-ext/packages/vscode/fixtures/functions /typescript/vscode-ext/packages/README.md /docs/docs/get-started/deploying/docker.mdx /engine/baml-lib/baml/tests/validation_files/variants/require_client_field.baml /typescript/fiddle-frontend/public/_examples/prompt-engineering/all-prompting-techniques /typescript/fiddle-frontend/public/_examples/intro/images/baml_src /engine/baml-lib/baml/tests/validation_files/generators/error.baml /typescript/fiddle-frontend/public/_examples/prompt-engineering/all-prompting-techniques/baml_src /integ-tests/baml-README.md /docs/docs/get-started/quickstart/editors-vscode.mdx /typescript/fiddle-frontend/public/_examples/intro/images /typescript/fiddle-frontend/public/_examples/prompt-engineering/chain-of-thought/baml_src /typescript/fiddle-frontend/public/_examples/prompt-engineering/symbol-tuning/baml_src /typescript/vscode-ext/packages/package.json /docs/docs /integ-tests/python/baml-README.md /typescript/fiddle-frontend/public/_examples/intro/chat-roles /typescript/fiddle-frontend/public/_examples/prompt-engineering /docs /typescript/fiddle-frontend/public/_examples /engine/baml-lib/baml/tests/validation_files/generators/v0.baml /engine/baml-lib/baml/tests/validation_files/generators /typescript/fiddle-frontend/public/_examples/intro/chat-roles/baml_src /engine/baml-runtime/src/cli
With Baml VS Code Extension 0.51 installed and
baml-py
0.51 installed, the following error appears when including thedefault_client_mode
in the generator:Property not known: "default_client_mode". Did you mean one of these: "output_type", "output_dir", "version"?baml