Skip to main content

Crate objectiveai_wasm_js

Crate objectiveai_wasm_js 

Source
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

Functions§

compileFunctionOutput
Computes the final output of a Function given input and task results.
compileFunctionTasks
Compiles a Function’s task expressions for a given input.
promptId
Computes a content-addressed ID for chat messages.
toolsId
Computes a content-addressed ID for a tools array.
validateEnsemble
Validates an Ensemble configuration and computes its content-addressed ID.
validateEnsembleLlm
Validates an Ensemble LLM configuration and computes its content-addressed ID.
vectorResponseId
Computes a content-addressed ID for a vector completion response option.