prompt-api-polyfill 1.2.1 → 1.2.2
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/README.md
CHANGED
|
@@ -142,7 +142,7 @@ npm install prompt-api-polyfill
|
|
|
142
142
|
dtype: 'q4f16', // Quantization level
|
|
143
143
|
env: {
|
|
144
144
|
// Optional: Pass low-level Transformers.js environment overrides
|
|
145
|
-
allowRemoteModels:
|
|
145
|
+
allowRemoteModels: true,
|
|
146
146
|
backends: {
|
|
147
147
|
onnx: {
|
|
148
148
|
wasm: {
|
|
@@ -239,7 +239,7 @@ This repo ships with a template file:
|
|
|
239
239
|
|
|
240
240
|
// Optional library-level overrides:
|
|
241
241
|
"env": {
|
|
242
|
-
"allowRemoteModels":
|
|
242
|
+
"allowRemoteModels": true,
|
|
243
243
|
"backends": {
|
|
244
244
|
"onnx": {
|
|
245
245
|
"wasm": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initializeApp as Fe } from "firebase/app";
|
|
2
2
|
import { VertexAIBackend as ze, GoogleAIBackend as Ue, getAI as je, getGenerativeModel as Ve, InferenceMode as We } from "firebase/ai";
|
|
3
|
-
import { P as Ke, D as Ge } from "../chunks/defaults-
|
|
3
|
+
import { P as Ke, D as Ge } from "../chunks/defaults-_qJIFiOb.js";
|
|
4
4
|
const qe = () => {
|
|
5
5
|
};
|
|
6
6
|
const be = function(t) {
|
package/dist/backends/gemini.js
CHANGED
package/dist/backends/openai.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class a {
|
|
2
2
|
#e;
|
|
3
3
|
/**
|
|
4
4
|
* @param {string} modelName - The name of the model.
|
|
@@ -49,9 +49,9 @@ class r {
|
|
|
49
49
|
throw new Error("Not implemented");
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const r = {
|
|
53
53
|
firebase: { modelName: "gemini-2.5-flash-lite" },
|
|
54
|
-
gemini: { modelName: "gemini-2.
|
|
54
|
+
gemini: { modelName: "gemini-2.5-flash-lite" },
|
|
55
55
|
openai: { modelName: "gpt-4o" },
|
|
56
56
|
transformers: {
|
|
57
57
|
modelName: "onnx-community/gemma-3-1b-it-ONNX-GQA",
|
|
@@ -60,6 +60,6 @@ const a = {
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
r as D,
|
|
64
|
+
a as P
|
|
65
65
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prompt-api-polyfill",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
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",
|