Closed kdshk closed 6 days ago
Hi @kdshk,
Could you please share the exact steps you are following from our documentation? This will help us understand the issue more clearly and assist you better.
Thank you!!
Hi @kdshk,
Could you please share the exact steps you are following from our documentation? This will help us understand the issue more clearly and assist you better.
Thank you!!
Hi I followed the sample here "https://ai.google.dev/edge/mediapipe/solutions/genai/llm_inference/web_js" and used "npm install @mediapipe/tasks-genai" to import gen ai library. Referred the sample code to initialize LlmInference, then the Chrome browser(132.0.6807.0). throw the error "TypeError: a.requestAdapterInfo is not a function". After visit "https://developer.mozilla.org/en-US/docs/Web/API/GPUAdapter/requestAdapterInfo" it seems requestAdapterInfo is "Deprecated" while @mediapipe/tasks-genai (0.10.18) is still using it. Simply uses the new info object in GPUAdapter manually can have this issue patched.
const genai = await FilesetResolver.forGenAiTasks( // path/to/wasm/root "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-genai@latest/wasm" ); llmInference = await LlmInference.createFromOptions(genai, { baseOptions: { modelAssetPath: '/assets/gemma-2b-it-gpu-int4.bin' }, maxTokens: 1000, topK: 40, temperature: 0.8, randomSeed: 101 });
Hi @schmidt-sebastian,
Could you please look into this issue?
Thank you!!
We merged a fix for this on Oct31 (https://github.com/google-ai-edge/mediapipe/commit/ba4b77058947def6c20efed3eb789f51775f1ee4), but unfortunately our Web release was cut on Oct 28th.
You should be able to use the latest nightly: https://www.npmjs.com/package/@mediapipe/tasks-genai/v/0.10.18-rc.20241108
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
None
OS Platform and Distribution
Windows 11, Chrome V130
Mobile device if the issue happens on mobile device
No response
Browser and version if the issue happens on browser
Version 132.0.6807.0 (Official Build)
Programming Language and version
javascript
MediaPipe version
0.10.18
Bazel version
No response
Solution
mediapipe/tasks-genai
Android Studio, NDK, SDK versions (if issue is related to building in Android environment)
No response
Xcode & Tulsi version (if issue is related to building for iOS)
No response
Describe the actual behavior
exception when call LlmInference.createFromOptions TypeError: a.requestAdapterInfo is not a functio
Describe the expected behaviour
should be success initialize the genAI task
Standalone code/steps you may have used to try to get what you need
Other info / Complete Logs