Skip to content
Niu DocsNiu 牛元文档
Dashboard控制台

GenerateContentRequest

Generated from the checked-in source. Do not edit this reference by hand.

SDK source. All SDK types.

TypeScript
/** Buffered native Gemini text. Requires an explicitly declared static or managed gemini route. */
export type GenerateContentRequest = {
contents: Array<{
role?: 'user' | 'model';
parts: Array<{
text: string;
}>;
}>;
systemInstruction?: {
role?: 'user' | 'model' | 'system';
parts: Array<{
text: string;
}>;
};
generationConfig: {
maxOutputTokens: number;
candidateCount?: 1;
temperature?: number;
topP?: number;
topK?: number;
stopSequences?: string[];
};
};