RequestExtensionsFormatGenerateContentInput(IEnumerablePart, String) Method

Creates a Content object based on the specified collection of Part instances and role.

Definition

Namespace: GenerativeAI
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public static Content FormatGenerateContentInput(
	IEnumerable<Part> request,
	string role = "user"
)

Parameters

request  IEnumerablePart
A collection of Part objects representing the content components.
role  String  (Optional)
The role associated with the content. Defaults to "user".

Return Value

Content
A new instance of Content containing the provided parts and specified role.

See Also