जवाबों को कंट्रोल करने के लिए, मॉडल कॉन्फ़िगरेशन का इस्तेमाल करना

मॉडल को कॉल करते समय, मॉडल के कॉन्फ़िगरेशन को साथ में भेजा जा सकता है. इससे यह कंट्रोल किया जा सकता है कि मॉडल, जवाब कैसे जनरेट करे. हर मॉडल के लिए, कॉन्फ़िगरेशन के अलग-अलग विकल्प होते हैं.

Google AI Studio का इस्तेमाल करके, प्रॉम्प्ट और मॉडल के कॉन्फ़िगरेशन के साथ एक्सपेरिमेंट भी किया जा सकता है Google AI Studio.

Gemini के कॉन्फ़िगरेशन के विकल्पों पर जाएं Imagen के कॉन्फ़िगरेशन के विकल्पों पर जाएं (अब उपलब्ध नहीं है)



Gemini मॉडल कॉन्फ़िगर करना

इस सेक्शन में, कॉन्फ़िगरेशन सेट अप करने का तरीका बताया गया है. साथ ही, Gemini मॉडल के साथ इस्तेमाल करने के लिए हर पैरामीटर के बारे में जानकारी दी गई है.

मॉडल का कॉन्फ़िगरेशन सेट अप करना (Gemini)

सामान्य Gemini इस्तेमाल के उदाहरणों के लिए कॉन्फ़िगरेशन

इस पेज पर, Gemini API प्रोवाइडर के हिसाब से कॉन्टेंट और कोड देखने के लिए, उस पर क्लिक करें.

कॉन्फ़िगरेशन, इंस्टेंस की लाइफ़टाइम के लिए बनाए रखा जाता है. अगर आपको कोई दूसरा कॉन्फ़िगरेशन इस्तेमाल करना है, तो उस कॉन्फ़िगरेशन के साथ नया GenerativeModel इंस्टेंस बनाएं.

Swift

GenerativeModel इंस्टेंस बनाते समय, GenerationConfig में पैरामीटर की वैल्यू सेट करें.


import FirebaseAILogic

// Set parameter values in a `GenerationConfig`.
// IMPORTANT: Example values shown here. Make sure to update for your use case.
let config = GenerationConfig(
  candidateCount: 1,
  temperature: 0.9,
  topP: 0.1,
  topK: 16,
  maxOutputTokens: 200,
  stopSequences: ["red"]
)

// Initialize the Gemini Developer API backend service
// Specify the config as part of creating the `GenerativeModel` instance
let model = FirebaseAI.firebaseAI(backend: .googleAI()).generativeModel(
  modelName: "GEMINI_MODEL_NAME",
  generationConfig: config
)

// ...

Kotlin

GenerativeModel इंस्टेंस बनाते समय, GenerationConfig में पैरामीटर की वैल्यू सेट करें.


// ...

// Set parameter values in a `GenerationConfig`.
// IMPORTANT: Example values shown here. Make sure to update for your use case.
val config = generationConfig {
    candidateCount = 1
    maxOutputTokens = 200
    stopSequences = listOf("red")
    temperature = 0.9f
    topK = 16
    topP = 0.1f
}

// Initialize the Gemini Developer API backend service
// Specify the config as part of creating the `GenerativeModel` instance
val model = Firebase.ai(backend = GenerativeBackend.googleAI()).generativeModel(
    modelName = "GEMINI_MODEL_NAME",
    generationConfig = config
)

// ...

Java

GenerativeModel इंस्टेंस बनाते समय, GenerationConfig में पैरामीटर की वैल्यू सेट करें.


// ...

// Set parameter values in a `GenerationConfig`.
// IMPORTANT: Example values shown here. Make sure to update for your use case.
GenerationConfig.Builder configBuilder = new GenerationConfig.Builder();
configBuilder.candidateCount = 1;
configBuilder.maxOutputTokens = 200;
configBuilder.stopSequences = List.of("red");
configBuilder.temperature = 0.9f;
configBuilder.topK = 16;
configBuilder.topP = 0.1f;

GenerationConfig config = configBuilder.build();

// Specify the config as part of creating the `GenerativeModel` instance
GenerativeModelFutures model = GenerativeModelFutures.from(
        FirebaseAI.getInstance(GenerativeBackend.googleAI())
                .generativeModel(
                    "GEMINI_MODEL_NAME",
                    config
                );
);

// ...

Web

GenerativeModel इंस्टेंस बनाते समय, GenerationConfig में पैरामीटर की वैल्यू सेट करें.


// ...

// Initialize the Gemini Developer API backend service
const ai = getAI(firebaseApp, { backend: new GoogleAIBackend() });

// Set parameter values in a `GenerationConfig`.
// IMPORTANT: Example values shown here. Make sure to update for your use case.
const generationConfig = {
  candidate_count: 1,
  maxOutputTokens: 200,
  stopSequences: ["red"],
  temperature: 0.9,
  topP: 0.1,
  topK: 16,
};

// Specify the config as part of creating the `GenerativeModel` instance
const model = getGenerativeModel(ai, { model: "GEMINI_MODEL_NAME",  generationConfig });

// ...

Dart

GenerativeModel इंस्टेंस बनाते समय, GenerationConfig में पैरामीटर की वैल्यू सेट करें.


// ...

// Set parameter values in a `GenerationConfig`.
// IMPORTANT: Example values shown here. Make sure to update for your use case.
final generationConfig = GenerationConfig(
  candidateCount: 1,
  maxOutputTokens: 200,
  stopSequences: ["red"],
  temperature: 0.9,
  topP: 0.1,
  topK: 16,
);

// Initialize the Gemini Developer API backend service
// Specify the config as part of creating the `GenerativeModel` instance
final model = FirebaseAI.googleAI().generativeModel(
  model: 'GEMINI_MODEL_NAME',
  config: generationConfig,
);

// ...

Unity

GenerativeModel इंस्टेंस बनाते समय, GenerationConfig में पैरामीटर की वैल्यू सेट करें.


// ...

// Set parameter values in a `GenerationConfig`.
// IMPORTANT: Example values shown here. Make sure to update for your use case.
var generationConfig = new GenerationConfig(
  candidateCount: 1,
  maxOutputTokens: 200,
  stopSequences: new string[] { "red" },
  temperature: 0.9f,
  topK: 16,
  topP: 0.1f
);

// Specify the config as part of creating the `GenerativeModel` instance
var ai = FirebaseAI.GetInstance(FirebaseAI.Backend.GoogleAI());
var model = ai.GetGenerativeModel(
  modelName: "GEMINI_MODEL_NAME",
  generationConfig: generationConfig
);

इस पेज के अगले सेक्शन में, हर पैरामीटर के बारे में जानकारी दी गई है.

Gemini Live API के लिए कॉन्फ़िगरेशन

इस पेज पर, Gemini API प्रोवाइडर के हिसाब से कॉन्टेंट और कोड देखने के लिए, उस पर क्लिक करें.

कॉन्फ़िगरेशन, इंस्टेंस की लाइफ़टाइम के लिए बनाए रखा जाता है. अगर आपको कोई दूसरा कॉन्फ़िगरेशन इस्तेमाल करना है, तो उस कॉन्फ़िगरेशन के साथ नया LiveModel इंस्टेंस बनाएं.

Swift

LiveModel इंस्टेंस को शुरू करते समय, liveGenerationConfig में पैरामीटर की वैल्यू सेट करें:


// ...

// Set parameter values in a `LiveGenerationConfig` (example values shown here)
let config = LiveGenerationConfig(
  temperature: 0.9,
  topP: 0.1,
  topK: 16,
  maxOutputTokens: 200,
  responseModalities: [.audio],
  speech: SpeechConfig(voiceName: "Fenrir"),
)

// Specify the config as part of creating the `liveModel` instance
let liveModel = FirebaseAI.firebaseAI(backend: .googleAI()).liveModel(
  modelName: "GEMINI_LIVE_MODEL_NAME",
  generationConfig: config
)

// ...

Kotlin

LiveModel इंस्टेंस बनाते समय, LiveGenerationConfig में पैरामीटर की वैल्यू सेट करें.


// ...

// Set parameter values in a `LiveGenerationConfig` (example values shown here)
val config = liveGenerationConfig {
    maxOutputTokens = 200
    responseModality = ResponseModality.AUDIO
    speechConfig = SpeechConfig(voice = Voices.FENRIR)
    temperature = 0.9f
    topK = 16
    topP = 0.1f
}

// Specify the config as part of creating the `LiveModel` instance
val liveModel = Firebase.ai(backend = GenerativeBackend.googleAI()).liveModel(
    modelName = "GEMINI_LIVE_MODEL_NAME",
    generationConfig = config
)

// ...

Java

LiveModel इंस्टेंस बनाते समय, LiveGenerationConfig में पैरामीटर की वैल्यू सेट करें.


// ...

// Set parameter values in a `LiveGenerationConfig` (example values shown here)
LiveGenerationConfig.Builder configBuilder = new LiveGenerationConfig.Builder();
configBuilder.setMaxOutputTokens(200);
configBuilder.setResponseModality(ResponseModality.AUDIO);

configBuilder.setSpeechConfig(new SpeechConfig(Voices.FENRIR));
configBuilder.setTemperature(0.9f);
configBuilder.setTopK(16);
configBuilder.setTopP(0.1f);

LiveGenerationConfig config = configBuilder.build();

// Specify the config as part of creating the `LiveModel` instance
LiveGenerativeModel lm = FirebaseAI.getInstance(GenerativeBackend.googleAI()).liveModel(
          "GEMINI_LIVE_MODEL_NAME",
          config
);

// ...

Web

LiveGenerationConfig इंस्टेंस को शुरू करते समय, पैरामीटर की वैल्यू सेट करें:LiveGenerativeModel


// ...

const ai = getAI(firebaseApp, { backend: new GoogleAIBackend() });

// Set parameter values in a `LiveGenerationConfig` (example values shown here)
const liveGenerationConfig = {
  maxOutputTokens: 200,
  responseModalities: [ResponseModality.AUDIO],
  speechConfig: {
    voiceConfig: {
      prebuiltVoiceConfig: { voiceName: "Fenrir" },
    },
  },
  temperature: 0.9,
  topP: 0.1,
  topK: 16,
};

// Specify the config as part of creating the `LiveGenerativeModel` instance
const liveModel = getLiveGenerativeModel(ai, {
  model: "GEMINI_LIVE_MODEL_NAME",
  liveGenerationConfig,
});

// ...

Dart

LiveGenerationConfig इंस्टेंस बनाते समय, में पैरामीटर की वैल्यू सेट करें.LiveGenerativeModel


// ...

// Set parameter values in a `LiveGenerationConfig` (example values shown here)
final config = LiveGenerationConfig(
  maxOutputTokens: 200,
  responseModalities: [ResponseModalities.audio],
  speechConfig: SpeechConfig(voiceName: 'Fenrir'),
  temperature: 0.9,
  topP: 0.1,
  topK: 16,
);

// Specify the config as part of creating the `liveGenerativeModel` instance
final liveModel = FirebaseAI.googleAI().liveGenerativeModel(
  model: 'GEMINI_LIVE_MODEL_NAME',
  liveGenerationConfig: config,
);

// ...

Unity

LiveModel इंस्टेंस बनाते समय, LiveGenerationConfig में पैरामीटर की वैल्यू सेट करें.


// ...

// Set parameter values in a `LiveGenerationConfig` (example values shown here)
var config = new LiveGenerationConfig(
  maxOutputTokens: 200,
  responseModalities: new[] { ResponseModality.Audio },
  speechConfig: SpeechConfig.UsePrebuiltVoice("Fenrir"),
  temperature: 0.9f,
  topK: 16,
  topP: 0.1f
);

// Specify the config as part of creating the `LiveModel` instance
var liveModel = FirebaseAI.GetInstance(FirebaseAI.Backend.GoogleAI()).GetLiveModel(
  modelName: "GEMINI_LIVE_MODEL_NAME",
  liveGenerationConfig: config
);

// ...

इस पेज के अगले सेक्शन में, हर पैरामीटर के बारे में जानकारी दी गई है.

पैरामीटर के बारे में जानकारी (Gemini)

यहां उपलब्ध पैरामीटर के बारे में खास जानकारी दी गई है. Gemini API के अपने चुने हुए Gemini API प्रोवाइडर के दस्तावेज़ में, पैरामीटर और उनकी वैल्यू की पूरी सूची देखी जा सकती है:Gemini Developer API याVertex AI Gemini API.

पैरामीटर जानकारी डिफ़ॉल्ट वैल्यू
ऑडियो टाइमस्टैंप
audioTimestamp

यह बूलियन, सिर्फ़ ऑडियो वाली इनपुट फ़ाइलों के लिए टाइमस्टैंप को समझने की सुविधा चालू करता है.

यह सुविधा सिर्फ़ तब लागू होती है, जब generateContent या generateContentStream कॉल का इस्तेमाल किया जाता है और इनपुट टाइप, सिर्फ़ ऑडियो वाली फ़ाइल होती है.

false
उम्मीदवारों की संख्या
candidateCount

इससे, जवाब के अलग-अलग वर्शन की संख्या तय की जाती है. हर अनुरोध के लिए, सभी उम्मीदवारों के आउटपुट टोकन का शुल्क लिया जाता है. हालांकि, इनपुट टोकन का शुल्क सिर्फ़ एक बार लिया जाता है.

इन वैल्यू का इस्तेमाल किया जा सकता है: 1 - 8 (इसमें ये दोनों वैल्यू भी शामिल हैं)

यह सुविधा सिर्फ़ तब लागू होती है, जब generateContent और Gemini के नए Gemini मॉडल का इस्तेमाल किया जाता है. Live API मॉडल और generateContentStream का इस्तेमाल नहीं किया जा सकता.

1
फ़्रीक्वेंसी पेनल्टी
frequencyPenalty
इससे, जनरेट किए गए जवाब में बार-बार दिखने वाले टोकन को शामिल करने की संभावना को कंट्रोल किया जाता है.
पॉज़िटिव वैल्यू से, जनरेट किए गए कॉन्टेंट में बार-बार दिखने वाले टोकन पर पेनल्टी लगती है. इससे, कॉन्टेंट के दोहराव की संभावना कम हो जाती है.
---
ज़्यादा से ज़्यादा आउटपुट टोकन
maxOutputTokens
इससे, जवाब में जनरेट किए जा सकने वाले टोकन की ज़्यादा से ज़्यादा संख्या तय की जाती है. ---
प्रज़ेंस पेनल्टी
presencePenalty
इससे, जनरेट किए गए जवाब में पहले से मौजूद टोकन को शामिल करने की संभावना को कंट्रोल किया जाता है.
पॉज़िटिव वैल्यू से, जनरेट किए गए कॉन्टेंट में पहले से मौजूद टोकन पर पेनल्टी लगती है. इससे, अलग-अलग तरह का कॉन्टेंट जनरेट होने की संभावना बढ़ जाती है.
---
सीक्वेंस रोकें
stopSequences

इससे, स्ट्रिंग की एक सूची तय की जाती है. अगर जवाब में इनमें से कोई स्ट्रिंग मिलती है, तो मॉडल को कॉन्टेंट जनरेट करना बंद करने का निर्देश मिलता है.

यह सुविधा सिर्फ़ तब लागू होती है, जब कॉन्फ़िगरेशन का इस्तेमाल किया जाता है.GenerativeModel

---
टेंपरेचर
temperature
इससे, जवाब में रैंडमनेस की डिग्री को कंट्रोल किया जाता है.
कम टेंपरेचर से, ज़्यादा सटीक जवाब मिलते हैं. वहीं, ज़्यादा टेंपरेचर से, अलग-अलग तरह के या क्रिएटिव जवाब मिलते हैं.
मॉडल पर निर्भर करता है
टॉप-के
topK
इससे, जनरेट किए गए कॉन्टेंट में इस्तेमाल किए जाने वाले, सबसे ज़्यादा संभावना वाले शब्दों की संख्या सीमित की जाती है.
टॉप-के की वैल्यू 1 का मतलब है कि चुने गए अगले टोकन की संभावना, मॉडल की शब्दावली में मौजूद सभी टोकन में सबसे ज़्यादा होनी चाहिए. वहीं, टॉप-के की वैल्यू n का मतलब है कि अगले टोकन को n सबसे ज़्यादा संभावना वाले टोकन में से चुना जाना चाहिए. यह सब, सेट किए गए टेंपरेचर के आधार पर तय होता है.
मॉडल पर निर्भर करता है
टॉप-पी
topP
इससे, जनरेट किए गए कॉन्टेंट की डाइवर्सिटी को कंट्रोल किया जाता है.
टोकन को सबसे ज़्यादा संभावना वाले (ऊपर टॉप-के देखें) से लेकर सबसे कम संभावना वाले टोकन तक चुना जाता है. यह तब तक जारी रहता है, जब तक उनकी संभावनाओं का योग, टॉप-पी वैल्यू के बराबर नहीं हो जाता.
मॉडल पर निर्भर करता है
जवाब के तरीके
responseModalities

इससे, आउटपुट का टाइप तय किया जाता है. जैसे, टेक्स्ट, ऑडियो या इमेज.

यह सुविधा सिर्फ़ तब लागू होती है, जब Live API मॉडल का इस्तेमाल किया जाता है या जब Gemini मॉडल का इस्तेमाल किया जाता है जो मल्टीमॉडल आउटपुट दे सकता है. जैसे, "Nano Banana" मॉडल.

---
स्पीच (आवाज़)
speechConfig

इससे, का इस्तेमाल करते समय, स्ट्रीम किए गए ऑडियो आउटपुट के लिए इस्तेमाल की जाने वाली आवाज़ तय की जाती हैLive API.

यह सुविधा सिर्फ़ तब लागू होती है, जब Live API मॉडल का इस्तेमाल किया जाता है.

Puck
इमेज की विशेषताएं
imageConfig

इससे, जनरेट की गई इमेज का आसपेक्ट रेशियो और रिज़ॉल्यूशन तय किया जाता है.

इन वैल्यू का इस्तेमाल किया जा सकता है: इमेज जनरेट करने की सुविधा को कॉन्फ़िगर करना देखें

यह सुविधा सिर्फ़ तब लागू होती है, जब Gemini ऐसे मॉडल का इस्तेमाल किया जाता है जो इमेज आउटपुट दे सकता है. जैसे, "Nano Banana" मॉडल.

1:1 आसपेक्ट रेशियो (स्क्वेयर)
1024x1024 रिज़ॉल्यूशन



Imagen मॉडल कॉन्फ़िगर करना

इस पेज पर, अपने Imagen API प्रोवाइडर के हिसाब से कॉन्टेंट और कोड देखने के लिए, उस पर क्लिक करें.

इस सेक्शन में, कॉन्फ़िगरेशन सेट अप करने का तरीका बताया गया है. साथ ही, Imagen मॉडल के साथ इस्तेमाल करने के लिए हर पैरामीटर के बारे में जानकारी दी गई है.

मॉडल का कॉन्फ़िगरेशन सेट अप करना (Imagen)

कॉन्फ़िगरेशन, इंस्टेंस की लाइफ़टाइम के लिए बनाए रखा जाता है. अगर आपको कोई दूसरा कॉन्फ़िगरेशन इस्तेमाल करना है, तो उस कॉन्फ़िगरेशन के साथ नया ImagenModel इंस्टेंस बनाएं.

Swift

ImagenModel इंस्टेंस बनाते समय, ImagenGenerationConfig में पैरामीटर की वैल्यू सेट करें.


import FirebaseAILogic

// Set parameter values in a `ImagenGenerationConfig` (example values shown here)
let config = ImagenGenerationConfig(
  negativePrompt: "frogs",
  numberOfImages: 2,
  aspectRatio: .landscape16x9,
  imageFormat: .jpeg(compressionQuality: 100),
  addWatermark: false
)

// Initialize the Gemini Developer API backend service
// Specify the config as part of creating the `ImagenModel` instance
let model = FirebaseAI.firebaseAI(backend: .googleAI()).imagenModel(
  modelName: "IMAGEN_MODEL_NAME",
  generationConfig: config
)

// ...

Kotlin

ImagenModel इंस्टेंस बनाते समय, ImagenGenerationConfig में पैरामीटर की वैल्यू सेट करें.


// ...

// Set parameter values in a `ImagenGenerationConfig` (example values shown here)
val config = ImagenGenerationConfig {
    negativePrompt = "frogs",
    numberOfImages = 2,
    aspectRatio = ImagenAspectRatio.LANDSCAPE_16x9,
    imageFormat = ImagenImageFormat.jpeg(compressionQuality = 100),
    addWatermark = false
}

// Initialize the Gemini Developer API backend service
// Specify the config as part of creating the `GenerativeModel` instance
val model = Firebase.ai(backend = GenerativeBackend.vertexAI()).imagenModel(
    modelName = "IMAGEN_MODEL_NAME",
    generationConfig = config
)

// ...

Java

ImagenModel इंस्टेंस बनाते समय, ImagenGenerationConfig में पैरामीटर की वैल्यू सेट करें.


// ...

// Set parameter values in a `ImagenGenerationConfig` (example values shown here)
ImagenGenerationConfig config = new ImagenGenerationConfig.Builder()
    .setNegativePrompt("frogs")
    .setNumberOfImages(2)
    .setAspectRatio(ImagenAspectRatio.LANDSCAPE_16x9)
    .setImageFormat(ImagenImageFormat.jpeg(100))
    .setAddWatermark(false)
    .build();

// Specify the config as part of creating the `ImagenModel` instance
ImagenModelFutures model = ImagenModelFutures.from(
        FirebaseAI.getInstance(GenerativeBackend.googleAI())
                .imagenModel(
                    "IMAGEN_MODEL_NAME",
                    config
                );
);

// ...

Web

ImagenModel इंस्टेंस बनाते समय, ImagenGenerationConfig में पैरामीटर की वैल्यू सेट करें.


// ...

// Initialize the Gemini Developer API backend service
const ai = getAI(firebaseApp, { backend: new GoogleAIBackend() });

// Set parameter values in a `ImagenGenerationConfig` (example values shown here)
const generationConfig = {
  negativePrompt: "frogs",
  numberOfImages: 2,
  aspectRatio: ImagenAspectRatio.LANDSCAPE_16x9,
  imageFormat: ImagenImageFormat.jpeg(100),
  addWatermark: false
};

// Specify the config as part of creating the `ImagenModel` instance
const model = getImagenModel(ai, { model: "IMAGEN_MODEL_NAME", generationConfig });

// ...

Dart

इंस्टेंस बनाते समय, ImagenGenerationConfig में पैरामीटर की वैल्यू सेट करें.ImagenModel


// ...

// Set parameter values in a `ImagenGenerationConfig` (example values shown here)
final generationConfig = ImagenGenerationConfig(
  negativePrompt: 'frogs',
  numberOfImages: 2,
  aspectRatio: ImagenAspectRatio.landscape16x9,
  imageFormat: ImagenImageFormat.jpeg(compressionQuality: 100)
  addWatermark: false
);

// Initialize the Gemini Developer API backend service
// Specify the config as part of creating the `ImagenModel` instance
final model = FirebaseAI.googleAI().imagenModel(
  model: 'IMAGEN_MODEL_NAME',
  config: generationConfig,
);

// ...

Unity

ImagenModel इंस्टेंस बनाते समय, ImagenGenerationConfig में पैरामीटर की वैल्यू सेट करें.


using Firebase.AI;

// Set parameter values in a `ImagenGenerationConfig` (example values shown here)
var config = new ImagenGenerationConfig(
  numberOfImages: 2,
  aspectRatio: ImagenAspectRatio.Landscape16x9,
  imageFormat: ImagenImageFormat.Jpeg(100)
);

// Initialize the Gemini Developer API backend service
// Specify the config as part of creating the `ImagenModel` instance
var model = FirebaseAI.GetInstance(FirebaseAI.Backend.GoogleAI()).GetImagenModel(
  modelName: "imagen-4.0-generate-001",
  generationConfig: config
);

// ...

इस पेज के अगले सेक्शन में, हर पैरामीटर के बारे में जानकारी दी गई है.

पैरामीटर के बारे में जानकारी (Imagen)

यहां उपलब्ध पैरामीटर के बारे में खास जानकारी दी गई है. दस्तावेज़ में, पैरामीटर और उनकी वैल्यू की पूरी सूची देखी जा सकती है.Google Cloud

पैरामीटर जानकारी डिफ़ॉल्ट वैल्यू
नेगेटिव प्रॉम्प्ट
negativePrompt
जनरेट की गई इमेज में, आपको जो चीज़ें नहीं चाहिए उनके बारे में जानकारी

में, फ़िलहाल इस पैरामीटर का इस्तेमाल नहीं किया जा सकताimagen-3.0-generate-002.

---
नतीजों की संख्या
numberOfImages
हर अनुरोध के लिए, जनरेट की गई इमेज की संख्या डिफ़ॉल्ट रूप से, एक इमेज
आसपेक्ट रेशियो
aspectRatio
जनरेट की गई इमेज की चौड़ाई-ऊंचाई का अनुपात डिफ़ॉल्ट रूप से, स्क्वेयर (1:1)
इमेज का फ़ॉर्मैट
imageFormat
आउटपुट के विकल्प. जैसे, इमेज का फ़ॉर्मेंट (MIME टाइप) और जनरेट की गई इमेज का कंप्रेस करने का लेवल डिफ़ॉल्ट MIME टाइप PNG है
अगर MIME टाइप JPEG पर सेट है, तो डिफ़ॉल्ट कंप्रेस करने का लेवल 75 है
वॉटरमार्क
addWatermark
जनरेट की गई इमेज में, SynthID नाम का ऐसा डिजिटल वॉटरमार्क जोड़ना है या नहीं जो दिखता नहीं है डिफ़ॉल्ट रूप से, true
लोगों की इमेज जनरेट करना
personGeneration
मॉडल को लोगों की इमेज जनरेट करने की अनुमति देनी है या नहीं डिफ़ॉल्ट रूप से, यह मॉडल पर निर्भर करता है
सुरक्षा से जुड़े एट्रिब्यूट शामिल करना
includeSafetyAttributes
फ़िल्टर न किए गए इनपुट और आउटपुट के जवाबों में, सुरक्षा से जुड़े एट्रिब्यूट की सूची के लिए, ज़िम्मेदार एआई के राउंड अप स्कोर चालू करने हैं या नहीं

सुरक्षा से जुड़े एट्रिब्यूट की कैटगरी: "Death, Harm & Tragedy", "Firearms & Weapons", "Hate", "Health", "Illicit Drugs", "Politics", "Porn", "Religion & Belief", "Toxic", "Violence", "Vulgarity", "War & Conflict".

डिफ़ॉल्ट रूप से, false



कॉन्टेंट जनरेट करने की सुविधा को कंट्रोल करने के अन्य विकल्प