Expand description
WebAssembly bindings for ObjectiveAI.
This crate provides JavaScript/TypeScript bindings for client-side validation and compilation of ObjectiveAI types. It enables browser-based applications to:
- Validate Ensemble LLM and Ensemble configurations
- Compute content-addressed IDs (deterministic hashes)
- Compile Function expressions for previewing during authoring
- Compute prompt, tools, and response IDs for caching/deduplication
§Usage
This crate is compiled to WebAssembly and consumed via the objectiveai npm package.
The TypeScript SDK wraps these functions with proper type definitions.
§Functions
validateEnsembleLlm- Validate and compute ID for an Ensemble LLMvalidateEnsemble- Validate and compute ID for an EnsemblecompileFunctionTasks- Compile function tasks for a given inputcompileFunctionOutput- Compile function output from task resultspromptId- Compute content-addressed ID for chat messagestoolsId- Compute content-addressed ID for toolsvectorResponseId- Compute content-addressed ID for a response option
Functions§
- compile
Function Output - Computes the final output of a Function given input and task results.
- compile
Function Tasks - Compiles a Function’s task expressions for a given input.
- prompt
Id - Computes a content-addressed ID for chat messages.
- toolsId
- Computes a content-addressed ID for a tools array.
- validate
Ensemble - Validates an Ensemble configuration and computes its content-addressed ID.
- validate
Ensemble Llm - Validates an Ensemble LLM configuration and computes its content-addressed ID.
- vector
Response Id - Computes a content-addressed ID for a vector completion response option.