Table of Contents

Class ChatSessionBackUpData

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

Represents a backup object for a chat session containing session-related data and configurations.

public class ChatSessionBackUpData
Inheritance
ChatSessionBackUpData
Inherited Members
Extension Methods

Constructors

ChatSessionBackUpData()

Initializes a new instance of the ChatSessionBackUpData class for JSON deserialization.

public ChatSessionBackUpData()

ChatSessionBackUpData(List<Content>, string, FunctionCallingBehaviour)

Initializes a new instance of the ChatSessionBackUpData class with the specified required properties.

public ChatSessionBackUpData(List<Content> history, string model, FunctionCallingBehaviour functionCallingBehaviour)

Parameters

history List<Content>

The history of the chat session.

model string

The model used in the chat session.

functionCallingBehaviour FunctionCallingBehaviour

The function calling behavior for the chat session.

Properties

CachedContent

Gets or sets the cached content within the chat session.

[JsonPropertyName("cachedContent")]
public CachedContent? CachedContent { get; set; }

Property Value

CachedContent

FunctionCallingBehaviour

Gets or sets the function calling behavior for the chat session.

[JsonPropertyName("functionCallingBehaviour")]
public FunctionCallingBehaviour FunctionCallingBehaviour { get; set; }

Property Value

FunctionCallingBehaviour

GenerationConfig

Gets or sets the configuration used for generating responses.

[JsonPropertyName("generationConfig")]
public GenerationConfig? GenerationConfig { get; set; }

Property Value

GenerationConfig

History

Gets or sets the history of the chat session.

[JsonPropertyName("history")]
public List<Content> History { get; set; }

Property Value

List<Content>

LastRequestContent

Gets or sets the content of the last request in the chat session.

[JsonPropertyName("lastRequestContent")]
public Content? LastRequestContent { get; set; }

Property Value

Content

LastResponseContent

Gets or sets the content of the last response in the chat session.

[JsonPropertyName("lastResponseContent")]
public Content? LastResponseContent { get; set; }

Property Value

Content

Model

Gets or sets the model used in the chat session.

[JsonPropertyName("model")]
public string Model { get; set; }

Property Value

string

RetrievalTool

Gets or sets the retrieval tool used in the chat session.

[JsonPropertyName("retrievalTool")]
public Tool? RetrievalTool { get; set; }

Property Value

Tool

SafetySettings

Gets or sets the safety settings for the chat session.

[JsonPropertyName("safetySettings")]
public List<SafetySetting>? SafetySettings { get; set; }

Property Value

List<SafetySetting>

SystemInstructions

Gets or sets the system instructions or guidelines for the chat session.

[JsonPropertyName("systemInstructions")]
public string? SystemInstructions { get; set; }

Property Value

string

ToolConfig

Gets or sets the configuration for additional tool usage in the chat session.

[JsonPropertyName("toolConfig")]
public ToolConfig? ToolConfig { get; set; }

Property Value

ToolConfig

UseCodeExecutionTool

Gets or sets a value indicating whether the code execution tool is enabled for the chat session.

[JsonPropertyName("useCodeExecutionTool")]
public bool UseCodeExecutionTool { get; set; }

Property Value

bool

UseGoogleSearch

Gets or sets a value indicating whether Google search is enabled for the chat session.

[JsonPropertyName("useGoogleSearch")]
public bool UseGoogleSearch { get; set; }

Property Value

bool

UseGrounding

Gets or sets a value indicating whether grounding is enabled for the chat session.

[JsonPropertyName("useGrounding")]
public bool UseGrounding { get; set; }

Property Value

bool

UseJsonMode

Gets or sets a value indicating whether the JSON mode is enabled.

[JsonPropertyName("useJsonMode")]
public bool UseJsonMode { get; set; }

Property Value

bool