Table of Contents

Class GeminiChatResponse

Response from the model supporting multiple candidates.

public class GeminiChatResponse : IAppendableData<GeminiChatResponse>
Inheritance
GeminiChatResponse
Implements
Extension Methods

Remarks

Note on safety ratings and content filtering. They are reported for both prompt in
PromptFeedback and for each candidate in FinishReason
and in SafetyRatings. The API contract is that:

  • either all requested candidates are returned or no candidates at all
  • no candidates are returned only if there was something wrong with the prompt (see PromptFeedback)
  • feedback on each candidate is reported on FinishReason and SafetyRatings.

Fields

Candidates

Candidate responses from the model.

public GeminiCandidate[] Candidates

Field Value

GeminiCandidate[]

PromptFeedback

Returns the prompt's feedback related to the content filters.

public GeminiPromptFeedback PromptFeedback

Field Value

GeminiPromptFeedback

UsageMetadata

Metadata on the generation requests' token usage.

public GeminiUsageMetadata UsageMetadata

Field Value

GeminiUsageMetadata

Properties

Parts

The parts of the GeminiChatResponse message.

public GeminiContentPart[] Parts { get; }

Property Value

GeminiContentPart[]

Methods

Append(GeminiChatResponse)

Appends the data to the current IAppendableData<T>.

public void Append(GeminiChatResponse data)

Parameters

data GeminiChatResponse

The data to append.