The <Inference> effect currently only exposes complete(String -> Result<String, String>). The embed operation — returning a vector embedding as Result<Array<Float64>, String> — was deferred from v0.0.101 because it requires heap allocation infrastructure for float arrays.
Scope
effect Inference {
op complete(String -> Result<String, String>);
op embed(String -> Result<Array<Float64>, String>);
}
The main blocker is returning a heap-allocated Array<Float64> from a WASM host import. The existing Result<String, String> pattern uses _alloc_result_ok_string; a parallel _alloc_result_ok_float_array helper is needed.
Providers
- Anthropic:
text-embedding-3-small / text-embedding-3-large via the embeddings endpoint
- OpenAI:
text-embedding-3-small (same API shape)
- Moonshot: TBD
Related
Deferred from #61 (v0.0.101).
The
<Inference>effect currently only exposescomplete(String -> Result<String, String>). Theembedoperation — returning a vector embedding asResult<Array<Float64>, String>— was deferred from v0.0.101 because it requires heap allocation infrastructure for float arrays.Scope
The main blocker is returning a heap-allocated
Array<Float64>from a WASM host import. The existingResult<String, String>pattern uses_alloc_result_ok_string; a parallel_alloc_result_ok_float_arrayhelper is needed.Providers
text-embedding-3-small/text-embedding-3-largevia the embeddings endpointtext-embedding-3-small(same API shape)Related
Deferred from #61 (v0.0.101).