Skip to content

.Net: Add public ctor for GeminiChatMessageContent with ToolCalls #12155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ionite34
Copy link

Motivation and Context

Fixes #12153

Since the IReadOnlyList<GeminiFunctionToolCall>? ToolCalls property of GeminiChatMessageContent is get only, and there is no public constructor accepting tool calls like there is for tool call results, it is currently not possible to recreate past history when loading context involving assistant messages with tool calls.

For manual tool invocation, it makes it impossible to recreate the last turn message for responding to the tool use manually.

This PR adds a public constructor to GeminiChatMessageContent accepting a IEnumerable<GeminiFunctionToolCall>

Description

Contribution Checklist

@ionite34 ionite34 requested a review from a team as a code owner May 19, 2025 03:52
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels May 19, 2025
@github-actions github-actions bot changed the title Add public ctor for GeminiChatMessageContent with ToolCalls .Net: Add public ctor for GeminiChatMessageContent with ToolCalls May 19, 2025
@ionite34
Copy link
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.Net: Unable to reconstruct GeminiChatMessageContent ToolCalls for message history
2 participants