prompt-api-polyfill 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/prompt-api-polyfill.js +13 -4
- package/package.json +1 -1
|
@@ -348,10 +348,19 @@ class d extends EventTarget {
|
|
|
348
348
|
);
|
|
349
349
|
}
|
|
350
350
|
static async #p(t = globalThis) {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
)
|
|
351
|
+
const e = d.#d(t);
|
|
352
|
+
if (e.path === "./backends/firebase.js")
|
|
353
|
+
return (await import("./backends/firebase.js")).default;
|
|
354
|
+
if (e.path === "./backends/gemini.js")
|
|
355
|
+
return (await import("./backends/gemini.js")).default;
|
|
356
|
+
if (e.path === "./backends/openai.js")
|
|
357
|
+
return (await import("./backends/openai.js")).default;
|
|
358
|
+
if (e.path === "./backends/transformers.js")
|
|
359
|
+
return (await import("./backends/transformers.js")).default;
|
|
360
|
+
throw new (t.DOMException || globalThis.DOMException)(
|
|
361
|
+
`Prompt API Polyfill: Unknown backend path "${e.path}".`,
|
|
362
|
+
"NotSupportedError"
|
|
363
|
+
);
|
|
355
364
|
}
|
|
356
365
|
static async #x(t = {}, e = globalThis) {
|
|
357
366
|
if (t.expectedInputs)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prompt-api-polyfill",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Polyfill for the Prompt API (`LanguageModel`) backed by Firebase AI Logic, Gemini API, OpenAI API, or Transformers.js.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/prompt-api-polyfill.js",
|