-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtryAGI.OpenAI.Models.GraderTextSimilarity.g.cs
More file actions
102 lines (93 loc) · 4.43 KB
/
tryAGI.OpenAI.Models.GraderTextSimilarity.g.cs
File metadata and controls
102 lines (93 loc) · 4.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#nullable enable
namespace tryAGI.OpenAI
{
/// <summary>
/// A TextSimilarityGrader object which grades text based on similarity metrics.
/// </summary>
public sealed partial class GraderTextSimilarity
{
/// <summary>
/// The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, <br/>
/// `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, <br/>
/// or `rouge_l`.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("evaluation_metric")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityEvaluationMetricJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::tryAGI.OpenAI.GraderTextSimilarityEvaluationMetric EvaluationMetric { get; set; }
/// <summary>
/// The text being graded.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("input")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string Input { get; set; }
/// <summary>
/// The name of the grader.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("name")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string Name { get; set; }
/// <summary>
/// The text being graded against.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("reference")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string Reference { get; set; }
/// <summary>
/// The type of grader.<br/>
/// Default Value: text_similarity
/// </summary>
/// <default>global::tryAGI.OpenAI.GraderTextSimilarityType.TextSimilarity</default>
[global::System.Text.Json.Serialization.JsonPropertyName("type")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::tryAGI.OpenAI.JsonConverters.GraderTextSimilarityTypeJsonConverter))]
public global::tryAGI.OpenAI.GraderTextSimilarityType Type { get; set; } = global::tryAGI.OpenAI.GraderTextSimilarityType.TextSimilarity;
/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
/// <summary>
/// Initializes a new instance of the <see cref="GraderTextSimilarity" /> class.
/// </summary>
/// <param name="evaluationMetric">
/// The evaluation metric to use. One of `cosine`, `fuzzy_match`, `bleu`, <br/>
/// `gleu`, `meteor`, `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, <br/>
/// or `rouge_l`.
/// </param>
/// <param name="input">
/// The text being graded.
/// </param>
/// <param name="name">
/// The name of the grader.
/// </param>
/// <param name="reference">
/// The text being graded against.
/// </param>
/// <param name="type">
/// The type of grader.<br/>
/// Default Value: text_similarity
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public GraderTextSimilarity(
global::tryAGI.OpenAI.GraderTextSimilarityEvaluationMetric evaluationMetric,
string input,
string name,
string reference,
global::tryAGI.OpenAI.GraderTextSimilarityType type = global::tryAGI.OpenAI.GraderTextSimilarityType.TextSimilarity)
{
this.EvaluationMetric = evaluationMetric;
this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input));
this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
this.Reference = reference ?? throw new global::System.ArgumentNullException(nameof(reference));
this.Type = type;
}
/// <summary>
/// Initializes a new instance of the <see cref="GraderTextSimilarity" /> class.
/// </summary>
public GraderTextSimilarity()
{
}
}
}