File tree Expand file tree Collapse file tree 2 files changed +760
-2
lines changed
packages/firebase_vertexai/firebase_vertexai Expand file tree Collapse file tree 2 files changed +760
-2
lines changed Original file line number Diff line number Diff line change @@ -591,7 +591,12 @@ enum HarmBlockThreshold {
591
591
high ('BLOCK_ONLY_HIGH' ),
592
592
593
593
/// Always show regardless of probability of unsafe content.
594
- none ('BLOCK_NONE' );
594
+ none ('BLOCK_NONE' ),
595
+
596
+ /// All content is allowed regardless of harm.
597
+ ///
598
+ /// metadata will not be included in the response.
599
+ off ('OFF' );
595
600
596
601
const HarmBlockThreshold (this ._jsonString);
597
602
@@ -602,6 +607,7 @@ enum HarmBlockThreshold {
602
607
'BLOCK_MEDIUM_AND_ABOVE' => HarmBlockThreshold .medium,
603
608
'BLOCK_ONLY_HIGH' => HarmBlockThreshold .high,
604
609
'BLOCK_NONE' => HarmBlockThreshold .none,
610
+ 'OFF' => HarmBlockThreshold .off,
605
611
_ => throw FormatException (
606
612
'Unhandled HarmBlockThreshold format' , jsonObject),
607
613
};
@@ -797,7 +803,7 @@ final class GenerationConfig extends BaseGenerationConfig {
797
803
if (responseMimeType case final responseMimeType? )
798
804
'responseMimeType' : responseMimeType,
799
805
if (responseSchema case final responseSchema? )
800
- 'responseSchema' : responseSchema,
806
+ 'responseSchema' : responseSchema. toJson () ,
801
807
};
802
808
}
803
809
You can’t perform that action at this time.
0 commit comments