Skip to content

Commit 769f39f

Browse files
feat(boxsdkgen): add confidence scores for structured extract (box/box-openapi#582) (#1379)
1 parent dbd17a9 commit 769f39f

7 files changed

Lines changed: 40 additions & 1 deletion

File tree

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "f9e2519", "specHash": "f8fb08c", "version": "6.4.0" }
1+
{ "engineHash": "f9e2519", "specHash": "ccdb456", "version": "6.4.0" }

BoxSdkGen/Box.Sdk.Gen.Net/Schemas/AiExtractStructured/AiExtractStructured.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public class AiExtractStructured : ISerializable {
2828
[JsonPropertyName("fields")]
2929
public IReadOnlyList<AiExtractStructuredFieldsField>? Fields { get; init; }
3030

31+
/// <summary>
32+
/// A flag to indicate whether confidence scores for every extracted field should be returned.
33+
/// </summary>
34+
[JsonPropertyName("include_confidence_score")]
35+
public bool? IncludeConfidenceScore { get; init; }
36+
3137
[JsonPropertyName("ai_agent")]
3238
public AiExtractStructuredAgent? AiAgent { get; init; }
3339

BoxSdkGen/Box.Sdk.Gen.Net/Schemas/AiExtractStructuredResponse/AiExtractStructuredResponse.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ public class AiExtractStructuredResponse : ISerializable {
2323
[JsonPropertyName("completion_reason")]
2424
public string? CompletionReason { get; init; }
2525

26+
/// <summary>
27+
/// The confidence score numeric values for each extracted field as a JSON dictionary. This can be empty if no field could be extracted.
28+
/// </summary>
29+
[JsonPropertyName("confidence_score")]
30+
[JsonConverter(typeof(DictionaryObjectValuesConverter))]
31+
public Dictionary<string, object>? ConfidenceScore { get; init; }
32+
2633
[JsonPropertyName("ai_agent_info")]
2734
public AiAgentInfo? AiAgentInfo { get; init; }
2835

BoxSdkGen/Box.Sdk.Gen.NetFramework/Schemas/AiExtractStructured/AiExtractStructured.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public class AiExtractStructured : ISerializable {
2828
[JsonPropertyName("fields")]
2929
public IReadOnlyList<AiExtractStructuredFieldsField> Fields { get; set; }
3030

31+
/// <summary>
32+
/// A flag to indicate whether confidence scores for every extracted field should be returned.
33+
/// </summary>
34+
[JsonPropertyName("include_confidence_score")]
35+
public bool? IncludeConfidenceScore { get; set; }
36+
3137
[JsonPropertyName("ai_agent")]
3238
public AiExtractStructuredAgent AiAgent { get; set; }
3339

BoxSdkGen/Box.Sdk.Gen.NetFramework/Schemas/AiExtractStructuredResponse/AiExtractStructuredResponse.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ public class AiExtractStructuredResponse : ISerializable {
2323
[JsonPropertyName("completion_reason")]
2424
public string CompletionReason { get; set; }
2525

26+
/// <summary>
27+
/// The confidence score numeric values for each extracted field as a JSON dictionary. This can be empty if no field could be extracted.
28+
/// </summary>
29+
[JsonPropertyName("confidence_score")]
30+
[JsonConverter(typeof(DictionaryObjectValuesConverter))]
31+
public Dictionary<string, object> ConfidenceScore { get; set; }
32+
2633
[JsonPropertyName("ai_agent_info")]
2734
public AiAgentInfo AiAgentInfo { get; set; }
2835

BoxSdkGen/Box.Sdk.Gen.NetStandard/Schemas/AiExtractStructured/AiExtractStructured.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public class AiExtractStructured : ISerializable {
2828
[JsonPropertyName("fields")]
2929
public IReadOnlyList<AiExtractStructuredFieldsField> Fields { get; set; }
3030

31+
/// <summary>
32+
/// A flag to indicate whether confidence scores for every extracted field should be returned.
33+
/// </summary>
34+
[JsonPropertyName("include_confidence_score")]
35+
public bool? IncludeConfidenceScore { get; set; }
36+
3137
[JsonPropertyName("ai_agent")]
3238
public AiExtractStructuredAgent AiAgent { get; set; }
3339

BoxSdkGen/Box.Sdk.Gen.NetStandard/Schemas/AiExtractStructuredResponse/AiExtractStructuredResponse.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ public class AiExtractStructuredResponse : ISerializable {
2323
[JsonPropertyName("completion_reason")]
2424
public string CompletionReason { get; set; }
2525

26+
/// <summary>
27+
/// The confidence score numeric values for each extracted field as a JSON dictionary. This can be empty if no field could be extracted.
28+
/// </summary>
29+
[JsonPropertyName("confidence_score")]
30+
[JsonConverter(typeof(DictionaryObjectValuesConverter))]
31+
public Dictionary<string, object> ConfidenceScore { get; set; }
32+
2633
[JsonPropertyName("ai_agent_info")]
2734
public AiAgentInfo AiAgentInfo { get; set; }
2835

0 commit comments

Comments
 (0)