Unfortunately, respect the censorship
This commit is contained in:
parent
2d6c571042
commit
ec53a7c1ee
1 changed files with 7 additions and 3 deletions
|
@ -145,10 +145,14 @@ export default class gemini {
|
||||||
let analyze = (RESPONSE_RAW) => {
|
let analyze = (RESPONSE_RAW) => {
|
||||||
let RESPONSES = [];
|
let RESPONSES = [];
|
||||||
|
|
||||||
// Check if the prompt has been blocked.
|
// Delete previous block state, if any.
|
||||||
while (RESPONSES.length < RESPONSE_RAW[`candidates`].length) {
|
delete this.blocked;
|
||||||
|
|
||||||
|
while (RESPONSES.length < RESPONSE_RAW[`candidates`].length && !this.blocked) {
|
||||||
|
this.blocked = RESPONSE_RAW[`candidates`][RESPONSES.length][`safetyRatings`][`blocked`];
|
||||||
|
|
||||||
// Check if the response is blocked.
|
// Check if the response is blocked.
|
||||||
if (!RESPONSE_RAW[`candidates`][RESPONSES.length][`safetyRatings`][`blocked`] && RESPONSE_RAW[`candidates`][RESPONSES.length][`content`]) {
|
if (!this.blocked && RESPONSE_RAW[`candidates`][RESPONSES.length][`content`]) {
|
||||||
let RESPONSE_CURRENT = [];
|
let RESPONSE_CURRENT = [];
|
||||||
|
|
||||||
let RESPONSES_RAW_ALL = RESPONSE_RAW[`candidates`][RESPONSES.length][`content`][`parts`];
|
let RESPONSES_RAW_ALL = RESPONSE_RAW[`candidates`][RESPONSES.length][`content`][`parts`];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue