-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Refactor ClientBase class fields to read-only properties 2. Optimized null handling in assignment of ResponseSafetyRatings 3. Several classes have been restructured and moved to become inner classes and their names have been adjusted to reflect this change by appending "Part" or "Element" to each. 4. Adjusted namespace for public types in Core to the parent namespace: Microsoft.SemanticKernel.Connectors.GoogleVertexAI. 5. The GeminiConfiguration class has been removed, and we now use a direct string for the modelId.
- Loading branch information
1 parent
cdafc20
commit f2866cf
Showing
14 changed files
with
218 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
dotnet/src/Connectors/Connectors.GoogleVertexAI.UnitTests/Core/Gemini/GeminiPartTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
dotnet/src/Connectors/Connectors.GoogleVertexAI/Core/Gemini/GeminiConfiguration.cs
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
dotnet/src/Connectors/Connectors.GoogleVertexAI/Core/Gemini/GeminiContent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
|
||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
using Microsoft.SemanticKernel.ChatCompletion; | ||
using Microsoft.SemanticKernel.Connectors.GoogleVertexAI.Core.Gemini; | ||
|
||
namespace Microsoft.SemanticKernel.Connectors.GoogleVertexAI; | ||
|
||
/// <summary> | ||
/// The base structured datatype containing multi-part content of a message. | ||
/// </summary> | ||
public sealed class GeminiContent | ||
{ | ||
/// <summary> | ||
/// Ordered Parts that constitute a single message. Parts may have different MIME types. | ||
/// </summary> | ||
[JsonPropertyName("parts")] | ||
[JsonRequired] | ||
public IList<GeminiPart> Parts { get; set; } = null!; | ||
|
||
/// <summary> | ||
/// Optional. The producer of the content. Must be either 'user' or 'model'. | ||
/// </summary> | ||
/// <remarks>Useful to set for multi-turn conversations, otherwise can be left blank or unset.</remarks> | ||
[JsonPropertyName("role")] | ||
[JsonConverter(typeof(AuthorRoleConverter))] | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||
public AuthorRole? Role { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.