@firebase/ai 2.1.0-canary.9b63cd60e → 2.1.0-canary.c5f08a9bc
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/esm/index.esm.js +5 -3
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/src/types/imagen/internal.d.ts +10 -0
- package/dist/index.cjs.js +5 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.node.cjs.js +5 -3
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +5 -3
- package/dist/index.node.mjs.map +1 -1
- package/dist/src/types/imagen/internal.d.ts +10 -0
- package/package.json +8 -8
package/dist/esm/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import { FirebaseError, getModularInstance } from '@firebase/util';
|
|
|
4
4
|
import { Logger } from '@firebase/logger';
|
|
5
5
|
|
|
6
6
|
var name = "@firebase/ai";
|
|
7
|
-
var version = "2.1.0-canary.
|
|
7
|
+
var version = "2.1.0-canary.c5f08a9bc";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
@@ -1324,8 +1324,9 @@ async function handlePredictResponse(response) {
|
|
|
1324
1324
|
gcsURI: prediction.gcsUri
|
|
1325
1325
|
});
|
|
1326
1326
|
}
|
|
1327
|
+
else if (prediction.safetyAttributes) ;
|
|
1327
1328
|
else {
|
|
1328
|
-
throw new AIError(AIErrorCode.RESPONSE_ERROR, `
|
|
1329
|
+
throw new AIError(AIErrorCode.RESPONSE_ERROR, `Unexpected element in 'predictions' array in response: '${JSON.stringify(prediction)}'`);
|
|
1329
1330
|
}
|
|
1330
1331
|
}
|
|
1331
1332
|
return { images, filteredReason };
|
|
@@ -1866,7 +1867,8 @@ function createPredictRequestBody(prompt, { gcsURI, imageFormat, addWatermark, n
|
|
|
1866
1867
|
addWatermark,
|
|
1867
1868
|
safetyFilterLevel,
|
|
1868
1869
|
personGeneration: personFilterLevel,
|
|
1869
|
-
includeRaiReason: true
|
|
1870
|
+
includeRaiReason: true,
|
|
1871
|
+
includeSafetyAttributes: true
|
|
1870
1872
|
}
|
|
1871
1873
|
};
|
|
1872
1874
|
return body;
|