File tree Expand file tree Collapse file tree 5 files changed +470
-46
lines changed Expand file tree Collapse file tree 5 files changed +470
-46
lines changed Original file line number Diff line number Diff line change
1
+ #if NET472_OR_GREATER || NETSTANDARD2_0
2
+ using System . Text . Json . Serialization ;
3
+ #endif
4
+
5
+ namespace Mscc . GenerativeAI
6
+ {
7
+ [ JsonConverter ( typeof ( JsonStringEnumConverter < ParameterType > ) ) ]
8
+ public enum ParameterType
9
+ {
10
+ /// <summary>
11
+ /// Unspecified means not specified, should not be used.
12
+ /// </summary>
13
+ Unspecified = 0 ,
14
+ /// <summary>
15
+ /// String means openAPI string type
16
+ /// </summary>
17
+ String = 1 ,
18
+ /// <summary>
19
+ /// Number means openAPI number type
20
+ /// </summary>
21
+ Number = 2 ,
22
+ /// <summary>
23
+ /// Integer means openAPI integer type
24
+ /// </summary>
25
+ Integer = 3 ,
26
+ /// <summary>
27
+ /// Boolean means openAPI boolean type
28
+ /// </summary>
29
+ Boolean = 4 ,
30
+ /// <summary>
31
+ /// Array means openAPI array type
32
+ /// </summary>
33
+ Array = 5 ,
34
+ /// <summary>
35
+ /// Object means openAPI object type
36
+ /// </summary>
37
+ Object = 6
38
+ }
39
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ public class Schema
7
7
/// <summary>
8
8
/// Optional. The type of the data.
9
9
/// </summary>
10
- public Type ? Type { get ; set ; }
10
+ public ParameterType ? Type { get ; set ; }
11
11
/// <summary>
12
12
/// Optional. The format of the data.
13
13
/// Supported formats:
@@ -22,7 +22,7 @@ public class Schema
22
22
/// <summary>
23
23
/// Optional. Indicates if the value may be null.
24
24
/// </summary>
25
- public bool Nullable { get ; set ; }
25
+ public bool ? Nullable { get ; set ; }
26
26
/// <summary>
27
27
/// Optional. Schema of the elements of Type.ARRAY.
28
28
/// </summary>
@@ -36,7 +36,7 @@ public class Schema
36
36
/// <summary>
37
37
/// Optional. Properties of Type.OBJECT.
38
38
/// </summary>
39
- public Schema ? Properties { get ; set ; }
39
+ public dynamic ? Properties { get ; set ; }
40
40
/// <summary>
41
41
/// Optional. Required properties of Type.OBJECT.
42
42
/// </summary>
Original file line number Diff line number Diff line change 1
- using System . Collections . Generic ;
1
+ #if NET472_OR_GREATER || NETSTANDARD2_0
2
+ using System . Collections . Generic ;
3
+ #endif
2
4
3
5
namespace Mscc . GenerativeAI
4
6
{
@@ -14,6 +16,7 @@ public class Tool
14
16
/// final response back to the user. Maximum 64 function declarations can be
15
17
/// provided.
16
18
/// </summary>
19
+ // [JsonPropertyName("function_declarations")]
17
20
public List < FunctionDeclaration > ? FunctionDeclarations { get ; set ; }
18
21
}
19
22
}
You can’t perform that action at this time.
0 commit comments