GenerateContentResponseExtensions Class

Provides extension methods for the GenerateContentResponse type in the GenerativeAI.Types namespace.

Definition

Namespace: GenerativeAI
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public static class GenerateContentResponseExtensions
Inheritance
Object    GenerateContentResponseExtensions

Methods

ExtractCodeBlocks Extracts all code blocks from the provided GenerateContentResponse.
ExtractJsonBlocks Extracts all JSON blocks from the provided GenerateContentResponse.
GetFunction Returns the first candidate’s first function call.
Text Returns the text of the first candidate’s first content part.
ToObjectT Extracts all JSON blocks from the provided GenerateContentResponse.
ToObjectsT Converts JSON blocks contained within the GenerateContentResponse into objects of the specified type.

See Also