-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codestaleIssue is stale because it has been open for a while and has no activityIssue is stale because it has been open for a while and has no activity
Description
Discussed in #11388
Originally posted by mlefebvre74-dev April 5, 2025
Hi Everyone,
I am following the following Example 3 in the GeminiFunctionCalling sample code and am able to get all the calledToolResult information into the ChatHistory using the GeminiChatMessageContent. All working great however, when I try to save the ChatHistory by serializing the session using this approach:
`
// Code from Example 3 in GeminiFunctionCalling sample code omitted (See link below)
ChatHistory chatHistory;
var options = new JsonSerializerOptions
{
WriteIndented = true,
};
var jsonHistory = JsonSerializer.Serialize(chatHistory, options);
var saveChatHistory = JsonSerializer.Deserialize<ChatHistory>(chatHistoryJson, options);
`
Can someone please advise how I can save the Gemini Chat history including calledToolResult so I can use it for further calls to the Gemini LLM.
Thank you!
Metadata
Metadata
Assignees
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codestaleIssue is stale because it has been open for a while and has no activityIssue is stale because it has been open for a while and has no activity