You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run bun segfault.js and the source of bun segfault.js contains:
import{pipeline}from"@xenova/transformers";exportclassSmolVector{store=[];similarityFn=(a,b)=>dot(a,b)/(norm(a)*norm(b));constructor(extractor){(async()=>{this.extractor=extractor??(awaitpipeline("feature-extraction","Xenova/all-MiniLM-L6-v2"));console.log("hiiii");})();}asyncadd(objects){// in parallel, check if item already has an embedding, and if not, run it through extractorawaitPromise.all(objects.map(async(object)=>{if(typeofobject==="string")object={chunk: object};// reformat itobject.id=object.id??randID();object.embedding=object.embedding??(awaitthis.extractor(object.chunk).data);this.store.push(object);}));}}constmyDB=newSmolVector();awaitmyDB.add(["strawberry","mango","pineapple","duck","dog","horse","armadillo",]);
What is the expected behavior?
code should just run
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983
What platform is your computer?
Darwin 21.6.0 arm64 arm
What steps can reproduce the bug?
run
bun segfault.js
and the source ofbun segfault.js
contains:What is the expected behavior?
code should just run
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: