IGenerativeModelGenerateContentAsync(IEnumerablePart, CancellationToken) Method
Generate content based on a sequence of Part objects.
Namespace: GenerativeAIAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
Task<GenerateContentResponse> GenerateContentAsync(
IEnumerable<Part> parts,
CancellationToken cancellationToken = default
)
- parts IEnumerablePart
- The sequence of Part objects to be used for generating content.
- cancellationToken CancellationToken (Optional)
- A token for cancelling the operation, if needed.
TaskGenerateContentResponseReturns an instance of GenerateContentResponse containing the generated content.