IGenerativeModelGenerateContentAsync(String, String, String, CancellationToken) Method
Generates content asynchronously based on the provided text prompt and an inline file path.
Namespace: GenerativeAIAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
Task<GenerateContentResponse> GenerateContentAsync(
string prompt,
string fileUri,
string mimeType,
CancellationToken cancellationToken = default
)
- prompt String
- The input text prompt used for generating content.
- fileUri String
- The URI to an file that should be included in the content generation request.
- mimeType String
[Missing <param name="mimeType"/> documentation for "M:GenerativeAI.IGenerativeModel.GenerateContentAsync(System.String,System.String,System.String,System.Threading.CancellationToken)"]
- cancellationToken CancellationToken (Optional)
- A token to monitor for cancellation requests.
TaskGenerateContentResponseA task that represents the asynchronous operation, containing the
GenerateContentResponse or null if content generation fails.