Repository navigation
docs(node): fix snippets that fail to run or compile - #1636
Conversation
- switch three blocks mixing `require` with top-level `await` to `import` - call `toolCallExecuteAsync` and `llmCallExecuteAsync` where callbacks are async - brace stream collector and type handles with `ToolHandle` and `LlmHandle` in `code-examples.mdx` - use `resultCodec` in typed tool boundary example in `using-codecs.mdx` - cast awaited response `as LlmResponse` in `wrap-llm-calls.mdx` - call `flushSubscribers` before exit in `provider-codecs.mdx` and `provider-response-codecs.mdx` Signed-off-by: Greyson Lalonde <[email protected]>
|
No actionable comments were generated in the recent review. WalkthroughThe pull request updates Node.js documentation examples to use ES module imports and asynchronous execution APIs. It also adds specific framework handle types and a custom codec, and calls ChangesNode.js documentation examples
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Possibly related PRs
Merge Risk:
|
Overview
This PR fixes Node.js documentation examples that do not compile or run as written.
Details
await.toolCallExecuteAsyncandllmCallExecuteAsyncwith asynchronous callbacks.ToolHandleandLlmHandlefor manual lifecycle helpers.Where should the reviewer start?
start with
docs/integrate-into-frameworks/wrap-tool-calls.mdxanddocs/integrate-into-frameworks/wrap-llm-calls.mdxto review the asynchronous execution changes.then review:
docs/integrate-into-frameworks/using-codecs.mdxfor the typed result codec.docs/integrate-into-frameworks/provider-codecs.mdxfor subscriber delivery.docs/integrate-into-frameworks/code-examples.mdxfor the corrected handle types.crates/node/README.mdfor the module import change.Summary by CodeRabbit