isaacr943
10/21/2025, 6:47 PMbaml-sam
10/21/2025, 6:48 PMbaml-sam
10/21/2025, 6:49 PMbaml_client whose location is controlled by the corresponding generator
generator target {
output_type "python/pydantic"
// Where the generated code will be saved (relative to baml_src/)
output_dir "../"
}baml-sam
10/21/2025, 6:49 PMbaml_client however you wantbaml-sam
10/21/2025, 6:49 PMisaacr943
10/21/2025, 6:50 PMisaacr943
10/21/2025, 6:50 PM@MacBook-Air BAML % deno task test test/prompting.test.ts
Task test deno test --env=.env --allow-net --allow-read --allow-write --allow-env "test/prompting.test.ts"
Check file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/test/prompting.test.ts
TS2307 [ERROR]: Cannot find module 'file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/baml_client/async_client'. Maybe add a '.ts' extension or run with --unstable-sloppy-imports
at file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/baml_client/index.ts:44:19
TS2307 [ERROR]: Cannot find module 'file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/baml_client/types'. Maybe add a '.ts' extension or run with --unstable-sloppy-imports
at file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/baml_client/index.ts:46:15
TS2307 [ERROR]: Cannot find module 'file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/baml_client/partial_types'. Maybe add a '.ts' extension or run with --unstable-sloppy-imports
at file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/baml_client/index.ts:47:36
TS2307 [ERROR]: Cannot find module 'file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/baml_client/tracing'. Maybe add a '.ts' extension or run with --unstable-sloppy-imports
at file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/baml_client/index.ts:48:15
TS2307 [ERROR]: Cannot find module 'file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/baml_client/events'. Maybe add a '.ts' extension or run with --unstable-sloppy-imports
at file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/baml_client/index.ts:49:25
TS2307 [ERROR]: Cannot find module 'file:///Users/Documents/GitHub/proyecto-itera/sandbox/BAML/baml_client/globals'. Maybe add a '.ts' extension or run with --unstable-sloppy-imports
at file:///Users/Documents/GitHub/proyecto-baml-sam
10/21/2025, 6:50 PMisaacr943
10/21/2025, 6:52 PM.
├── baml_client
├── baml_src
│ ├── PromptElaboration.baml
│ ├── clients.baml
│ ├── generators.baml
│ ├── main.ts
│ └── resume.baml
├── deno.json
├── deno.lock
├── edit.md
├── main.ts
├── node_modules
├── obsidian-itera-baml
│ ├── test.md
│ ├── the-digital-lighthouse.md
│ ├── the-garden-of-functions.md
│ └── the-last-commit.md
├── src
│ ├── routes
│ ├── third-party
│ └── utils
└── test
└── prompting.test.tsbaml-sam
10/21/2025, 6:53 PMoutput_dir ../src/ to put baml_client in src/ - or is there something different you're asking for?isaacr943
10/21/2025, 6:55 PMisaacr943
10/21/2025, 6:55 PMisaacr943
10/21/2025, 7:08 PM"test": "deno test --env=.env --unstable-sloppy-imports --allow-ffi --allow-net --allow-read --allow-write --allow-env",
---
For future reference, what I did was:
1. baml_src > generators.baml > output_dir "../src/"
2. deno task baml-generate
3. Import b at my file prompting.test.ts like this import { b } from "../src/baml_client/index.ts";
(b has autocomplete - nice)
4. Ran deno task test test/prompting.test.ts
That worked!
Thank you again