8000 WSL Problem · Issue #41 · hrishioa/lumentis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

WSL Problem #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account rel 8000 ated emails.

Already on GitHub? Sign in to your account

Open
mosnicholas opened this issue Aug 17, 2024 · 2 comments
Open

WSL Problem #41

mosnicholas opened this issue Aug 17, 2024 · 2 comments

Comments

@mosnicholas
Copy link
mosnicholas commented Aug 17, 2024

Running on a macbook.

➜  lumentis npx lumentis
Need to install the following packages:
lumentis@0.2.4
Ok to proceed? (y) y

/Users/nicholasmoschopoulos/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.cjs:2
"use strict";var Pt=Object.create;var Ae=Object.defineProperty;var Mt=Object.getOwnPropertyDescriptor;var Et=Object.getOwnPropertyNames;var It=Object.getPrototypeOf,Nt=Object.prototype.hasOwnProperty;var u=(t,e)=>Ae(t,"name",{value:e,configurable:!0});var Qe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var At=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Et(e))!Nt.call(t,s)&&s!==n&&Ae(t,s,{get:()=>e[s],enumerable:!(o=Mt(e,s))||o.enumerable});return t};var C=(t,e,n)=>(n=t!=null?Pt(It(t)):{},At(e||!t||!t.__esModule?Ae(n,"default",{value:t,enumerable:!0}):n,t));var ot=Qe((on,F)=>{"use strict";var l;F.exports.__wbg_set_wasm=function(t){l=t};var Y=new Array(128).fill(void 0);Y.push(void 0,null,!0,!1);function we(t){return Y[t]}u(we,"getObject");var j=0,fe=null;function ee(){return(fe===null||fe.byteLength===0)&&(fe=new Uint8Array(l.memory.buffer)),fe}u(ee,"getUint8Memory0");var jt=typeof TextEncoder=="undefined"?(0,F.require)("util").TextEncoder:TextEncoder,ye=new jt("utf-8"),Ft=typeof ye.encodeInto=="function"?function(t,e){return ye.encodeInto(t,e)}:function(t,e){let n=ye.encode(t);return e.set(n),{read:t.length,written:n.length}};function Q(t,e,n){if(n===void 0){let a=ye.encode(t),p=e(a.length,1)>>>0;return ee().subarray(p,p+a.length).set(a),j=a.length,p}let o=t.length,s=e(o,1)>>>0,i=ee(),c=0;for(;c<o;c++){let a=t.charCodeAt(c);if(a>127)break;i[s+c]=a}if(c!==o){c!==0&&(t=t.slice(c)),s=n(s,o,o=c+t.length*3,1)>>>0;let a=ee().subarray(s+c,s+o),p=Ft(t,a);c+=p.written,s=n(s,o,c,1)>>>0}return j=c,s}u(Q,"passStringToWasm0");function Ct(t){return t==null}u(Ct,"isLikeNone");var ge=null;function x(){return(ge===null||ge.byteLength===0)&&(ge=new Int32Array(l.memory.buffer)),ge}u(x,"getInt32Memory0");var re=Y.length;function Lt(t){t<132||(Y[t]=re,re=t)}u(Lt,"dropObject");function V(t){let e=we(t);return Lt(t),e}u(V,"takeObject");var $t=typeof TextDecoder=="undefined"?(0,F.require)("util").TextDecoder:TextDecoder,et=new $t("utf-8",{ignoreBOM:!0,fatal:!0});et.decode();function ke(t,e){return t=t>>>0,et.decode(ee().subarray(t,t+e))}u(ke,"getStringFromWasm0");function D(t){re===Y.length&&Y.push(Y.length+1);let e=re;return re=Y[e],Y[e]=t,e}u(D,"addHeapObject");function tt(t,e){try{return t.apply(this,e)}catch(n){l.__wbindgen_export_2(D(n))}}u(tt,"handleError");var he=null;function nt(){return(he===null||he.byteLength===0)&&(he=new Uint32Array(l.memory.buffer)),he}u(nt,"getUint32Memory0");function Ve(t,e){return t=t>>>0,nt().subarray(t/4,t/4+e)}u(Ve,"getArrayU32FromWasm0");function Rt(t,e){let n=e(t.length*1,1)>>>0;return ee().set(t,n/1),j=t.length,n}u(Rt,"passArray8ToWasm0");function Dt(t,e){let n=e(t.length*4,4)>>>0;return nt().set(t,n/4),j=t.length,n}u(Dt,"passArray32ToWasm0");function Xe(t,e){return t=t>>>0,ee().subarray(t/1,t/1+e)}u(Xe,"getArrayU8FromWasm0");F.exports.get_encoding=function(t,e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let i=l.__wbindgen_add_to_stack_pointer(-16),c=Q(t,l.__wbindgen_export_0,l.__wbindgen_export_1),a=j;l.get_encoding(i,c,a,D(e));var n=x()[i/4+0],o=x()[i/4+1],s=x()[i/4+2];if(s)throw V(o);return ie.__wrap(n)}finally{l.__wbindgen_add_to_stack_pointer(16)}};F.exports.encoding_for_model=function(t,e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let i=l.__wbindgen_add_to_stack_pointer(-16),c=Q(t,l.__wbindgen_export_0,l.__wbindgen_export_1),a=j;l.encoding_for_model(i,c,a,D(e));var n=x()[i/4+0],o=x()[i/4+1],s=x()[i/4+2];if(s)throw V(o);return ie.__wrap(n)}finally{l.__wbindgen_add_to_stack_pointer(16)}};var Ze=typeof FinalizationRegistry=="undefined"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>l.__wbg_tiktoken_free(t>>>0)),_e=class _e{constructor(e,n,o){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");let s=Q(e,l.__wbindgen_export_0,l.__wbindgen_export_1),i=j,c=Q(o,l.__wbindgen_export_0,l.__wbindgen_export_1),a=j,p=l.tiktoken_new(s,i,D(n),c,a);return this.__wbg_ptr=p>>>0,this}get name(){try{let o=l.__wbindgen_add_to_stack_pointer(-16);l.tiktoken_name(o,this.__wbg_ptr);var e=x()[o/4+0],n=x()[o/4+1];let s;return e!==0&&(s=ke(e,n).slice(),l.__wbindgen_export_3(e,n*1,1)),s}finally{l.__wbindgen_add_to_stack_pointer(16)}}static __wrap(e){e=e>>>0;let n=Object.create(_e.prototype);return n.__wbg_ptr=e,Ze.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ze.unregister(this),e}free(){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");let e=this.__destroy_into_raw();l.__wbg_tiktoken_free(e)}encode(e,n,o){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let y=l.__wbindgen_add_to_stack_pointer(-16),b=Q(e,l.__wbindgen_export_0,l.__wbindgen_export_1),v=j;l.tiktoken_encode(y,this.__wbg_ptr,b,v,D(n),D(o));var s=x()[y/4+0],i=x()[y/4+1],c=x()[y/4+2],a=x()[y/4+3];if(a)throw V(c);var p=Ve(s,i).slice();return l.__wbindgen_export_3(s,i*4,4),p}finally{l.__wbindgen_add_to_stack_pointer(16)}}encode_ordinary(e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let i=l.__wbindgen_add_to_stack_pointer(-16),c=Q(e,l.__wbindgen_export_0,l.__wbindgen_export_1),a=j;l.tiktoken_encode_ordinary(i,this.__wbg_ptr,c,a);var n=x()[i/4+0],o=x()[i/4+1],s=Ve(n,o).slice();return l.__wbindgen_export_3(n,o*4,4),s}finally{l.__wbindgen_add_to_stack_pointer(16)}}encode_with_unstable(e,n,o){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let a=l.__wbindgen_add_to_stack_pointer(-16),p=Q(e,l.__wbindgen_export_0,l.__wbindgen_export_1),y=j;l.tiktoken_encode_with_unstable(a,this.__wbg_ptr,p,y,D(n),D(o));var s=x()[a/4+0],i=x()[a/4+1],c=x()[a/4+2];if(c)throw V(i);return V(s)}finally{l.__wbindgen_add_to_stack_pointer(16)}}encode_single_token(e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");let n=Rt(e,l.__wbindgen_export_0),o=j;return l.tiktoken_encode_single_token(this.__wbg_ptr,n,o)>>>0}decode(e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let i=l.__wbindgen_add_to_stack_pointer(-16),c=Dt(e,l.__wbindgen_export_0),a=j;l.tiktoken_decode(i,this.__wbg_ptr,c,a);var n=x()[i/4+0],o=x()[i/4+1],s=Xe(n,o).slice();return l.__wbindgen_export_3(n,o*1,1),s}finally{l.__wbindgen_add_to_stack_pointer(16)}}decode_single_token_bytes(e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let i=l.__wbindgen_add_to_stack_pointer(-16);l.tiktoken_decode_single_token_bytes(i,this.__wbg_ptr,e);var n=x()[i/4+0],o=x()[i/4+1],s=Xe(n,o).slice();return l.__wbindgen_export_3(n,o*1,1),s}finally{l.__wbindgen_add_to_stack_pointer(16)}}token_byte_values(){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");let e=l.tiktoken_token_byte_values(this.__wbg_ptr);return V(e)}};u(_e,"Tiktoken");var ie=_e;F.exports.Tiktoken=ie;F.exports.__wbindgen_string_get=function(t,e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");let n=we(e),o=typeof n=="string"?n:void 0;var s=Ct(o)?0:Q(o,l.__wbindgen_export_0,l.__wbindgen_export_1),i=j;x()[t/4+1]=i,x()[t/4+0]=s};F.exports.__wbindgen_object_drop_ref=function(t){V(t)};F.exports
8000
.__wbindgen_is_undefined=function(t){return we(t)===void 0};F.exports.__wbg_stringify_8887fe74e1c50d81=function(){return tt(function(t){let e=JSON.stringify(we(t));return D(e)},arguments)};F.exports.__wbindgen_error_new=function(t,e){let n=new Error(ke(t,e));return D(n)};F.exports.__wbg_parse_66d1801634e099ac=function(){return tt(function(t,e){let n=JSON.parse(ke(t,e));return D(n)},arguments)};F.exports.__wbindgen_throw=function(t,e){throw new Error(ke(t,e))}});var st=Qe(be=>{"use strict";var se=ot(),rt={};rt["./tiktoken_bg.js"]=se;var te=require("path"),Wt=require("fs"),it=__dirname.split(te.sep).reduce((t,e,n,o)=>{let s=o.slice(0,n+1).join(te.sep)+te.sep;return s.includes("node_modules"+te.sep)||t.unshift(te.join(s,"node_modules","tiktoken","","./tiktoken_bg.wasm")),t},[]);it.unshift(te.join(__dirname,"./tiktoken_bg.wasm"));var je=null;for(let t of it)try{je=Wt.readFileSync(t);break}catch(e){}if(je==null)throw new Error("Missing tiktoken_bg.wasm");var Gt=new WebAssembly.Module(je),Jt=new WebAssembly.Instance(Gt,rt);se.__wbg_set_wasm(Jt.exports);be.get_encoding=se.get_encoding;be.encoding_for_model=se.encoding_for_model;be.Tiktoken=se.Tiktoken});var R=C(require("fs"),1),Me=C(require("path"),1),St=require("@anthropic-ai/tokenizer"),m=require("@inquirer/prompts"),Tt=require("youtube-transcript");var L=C(require("fs"),1),Oe=C(require("path"),1),Ge=C(require("@anthropic-ai/sdk"),1),Je=C(require("openai"),1),yt=C(st(),1),Ue=require("@anthropic-ai/tokenizer"),_t=require("@google/generative-ai");var Fe=C(require("path"),1),W=require("@google/generative-ai"),ae=".lumentis",Ut="wizard.json",at="messages",ne=Fe.default.join(process.cwd(),ae),le=Fe.default.join(ne,Ut),lt=1e4;var X=[{name:"Claude 3 Opus",model:"claude-3-opus-20240229",smarterDescription:"This is the ferrari. Expensive but so good.",pageDescription:"Smartest - Use for expensive but awesome results!"},{name:"Claude 3 Sonnet",model:"claude-3-sonnet-20240229",smarterDescription:"Perfectly fine!",pageDescription:"Middle child - still kind of expensive"},{name:"Claude 3 Haiku",model:"claude-3-haiku-20240307",smarterDescription:"Cheapest, not preferred for this stage",pageDescription:"Fast and cheap - get what we pay for"},{name:"OpenAI GPT-4 Omni",model:"gpt-4o",smarterDescription:"Worse than Opus, far better rate limits",pageDescription:"If you like OpenAI this is the one"},{name:"Gemini 1.5 Flash",model:"gemini-1.5-flash-latest",smarterDescription:"Fast and cheap, with a lot more output length",pageDescription:"For any Google stans"}],k={"claude-3-opus-20240229":{provider:"anthropic",totalTokenLimit:2e5,outputTokenLimit:4096,inputTokensPerM:15,outputTokensPerM:75},"claude-3-sonnet-20240229":{provider:"anthropic",totalTokenLimit:2e5,outputTokenLimit:4096,inputTokensPerM:3,outputTokensPerM:15},"claude-3-haiku-20240307":{provider:"anthropic",totalTokenLimit:2e5,outputTokenLimit:4096,inputTokensPerM:.25,outputTokensPerM:1.25},"gpt-4o":{provider:"openai",tokenCountingModel:"gpt-4",totalTokenLimit:128e3,outputTokenLimit:4096,inputTokensPerM:5,outputTokensPerM:15},"gemini-1.5-flash-latest":{provider:"google",totalTokenLimit:1e6,outputTokenLimit:8192,inputTokensPerM:.75,outputTokensPerM:.53,notes:`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

LinkError: WebAssembly.Instance(): Import #4 module="./tiktoken_bg.js" function="__wbg_parse_52202f117ec9ecfa" error: function import requires a callable
    at /Users/nicholasmoschopoulos/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.cjs:2:8336
    at /Users/nicholasmoschopoulos/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.cjs:2:275
    at Object.<anonymous> (/Users/nicholasmoschopoulos/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.cjs:2:8768)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49

Node.js v20.10.0

NPM version:

➜  lumentis npm -v
10.8.1
@ashaney
Copy link
ashaney commented Oct 14, 2024

Unfortunately I'm having the same issue on an M2 Mac Mini:

LinkError: WebAssembly.Instance(): Import #4 module="./tiktoken_bg.js" function="__wbg_parse_52202f117ec9ecfa" error: function import requires a callable
    at /Users/aaron/.npm/_npx/863bf0d133b81a42/node_modules/lumentis/dist/app.cjs:2:8336
    at /Users/aaron/.npm/_npx/863bf0d133b81a42/node_modules/lumentis/dist/app.cjs:2:275
    at Object.<anonymous> (/Users/aaron/.npm/_npx/863bf0d133b81a42/node_modules/lumentis/dist/app.cjs:2:8768)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at node:internal/main/run_main_module:28:49

Node 20.18.0, npm 10.9.0

@gauravpathak-infa
Copy link

Same on M2 Ultra: LinkError: WebAssembly.Instance(): Import #4 module="./tiktoken_bg.js" function="__wbg_parse_52202f117ec9ecfa" error: function import requires a callable
at /Users/gauravpathak/.npm/_npx/863bf0d133b81a42/node_modules/lumentis/dist/app.cjs:2:8336
at /Users/gauravpathak/.npm/_npx/863bf0d133b81a42/node_modules/lumentis/dist/app.cjs:2:275
at Object. (/Users/gauravpathak/.npm/_npx/863bf0d133b81a42/node_modules/lumentis/dist/app.cjs:2:8768)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49

Node.js v20.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0