Skip to content

Commit 15a563d

Browse files
authored
Merge pull request #42 from Uralstech/unstable
UGemini v2.2.0
2 parents 4e4e6fb + 5e5aa26 commit 15a563d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+318
-15
lines changed
Binary file not shown.
Binary file not shown.

UGemini/Packages/com.uralstech.ugemini/Runtime/Scripts/Data/EnumExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ namespace Uralstech.UGemini
1010
public static class EnumExtensions
1111
{
1212
/// <summary>
13-
/// Converts an <see cref="Enum"/> to the value defined in its <see cref="EnumMemberAttribute">
13+
/// Converts an <see cref="Enum"/> to the value defined in its <see cref="EnumMemberAttribute"/>.
1414
/// </summary>
1515
/// <param name="enumValue">The enum value.</param>
1616
/// <returns>The value.</returns>
17-
/// <exception cref="NotImplementedException">Thrown if an <see cref="EnumMemberAttribute"> for the enum value could not be found.</exception>
17+
/// <exception cref="NotImplementedException">Thrown if an <see cref="EnumMemberAttribute"/> could not be found on the enum value.</exception>
1818
public static string EnumMemberValue(this Enum enumValue)
1919
{
2020
Type type = enumValue.GetType();

UGemini/Packages/com.uralstech.ugemini/Runtime/Scripts/Data/Files/GeminiFile.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Newtonsoft.Json.Serialization;
33
using System;
44
using Uralstech.UCloud.Operations;
5+
using Uralstech.UGemini.JsonConverters;
56

67
namespace Uralstech.UGemini.FileAPI
78
{
@@ -35,6 +36,7 @@ public class GeminiFile
3536
/// <summary>
3637
/// Size of the file in bytes.
3738
/// </summary>
39+
[JsonConverter(typeof(GeminiLongToStringJsonConverter))]
3840
public long SizeBytes;
3941

4042
/// <summary>
@@ -71,6 +73,12 @@ public class GeminiFile
7173
/// Error status if <see cref="GeminiFile"/> processing failed.
7274
/// </summary>
7375
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
76+
public OperationStatus Error;
77+
78+
/// <summary>
79+
/// Error status if <see cref="GeminiFile"/> processing failed.
80+
/// </summary>
81+
[JsonProperty(NullValueHandling = NullValueHandling.Ignore), Obsolete("Use GeminiFile.Error instead.")]
7482
public OperationStatus Status;
7583

7684
/// <summary>

UGemini/Packages/com.uralstech.ugemini/Runtime/Scripts/Data/Files/GeminiFileVideoMetaData.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Newtonsoft.Json;
22
using Newtonsoft.Json.Serialization;
33
using System;
4+
using Uralstech.UGemini.JsonConverters;
45

56
namespace Uralstech.UGemini.FileAPI
67
{

UGemini/Packages/com.uralstech.ugemini/Runtime/Scripts/Data/Models/Caching/Create/GeminiCachedContentCreationData.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Newtonsoft.Json.Serialization;
33
using System;
44
using System.ComponentModel;
5+
using Uralstech.UGemini.JsonConverters;
56
using Uralstech.UGemini.Models.Content;
67
using Uralstech.UGemini.Models.Generation.Tools.Declaration;
78

UGemini/Packages/com.uralstech.ugemini/Runtime/Scripts/Data/Models/Caching/GeminiCachedConent.cs renamed to UGemini/Packages/com.uralstech.ugemini/Runtime/Scripts/Data/Models/Caching/GeminiCachedContent.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Newtonsoft.Json.Serialization;
33
using System;
44
using System.ComponentModel;
5+
using Uralstech.UGemini.JsonConverters;
56

67
namespace Uralstech.UGemini.Models.Caching
78
{

UGemini/Packages/com.uralstech.ugemini/Runtime/Scripts/Data/Models/Caching/Patch/GeminiCachedContentPatchData.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Newtonsoft.Json.Serialization;
33
using System;
44
using System.ComponentModel;
5+
using Uralstech.UGemini.JsonConverters;
56

67
namespace Uralstech.UGemini.Models.Caching
78
{

UGemini/Packages/com.uralstech.ugemini/Runtime/Scripts/Data/Models/CountTokens/GeminiTokenCountResponse.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,10 @@ public class GeminiTokenCountResponse
1818
/// Cached content is not supported in this package.
1919
/// </remarks>
2020
public int TotalTokens;
21+
22+
/// <summary>
23+
/// Number of tokens in the cached part of the prompt (the cached content).
24+
/// </summary>
25+
public int CachedContentTokenCount;
2126
}
2227
}

0 commit comments

Comments
 (0)