-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathAIFunctionDeclaration.xml
More file actions
130 lines (130 loc) · 8.28 KB
/
Copy pathAIFunctionDeclaration.xml
File metadata and controls
130 lines (130 loc) · 8.28 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<Type Name="AIFunctionDeclaration" FullName="Microsoft.Extensions.AI.AIFunctionDeclaration">
<TypeSignature Language="C#" Value="public abstract class AIFunctionDeclaration : Microsoft.Extensions.AI.AITool" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract beforefieldinit AIFunctionDeclaration extends Microsoft.Extensions.AI.AITool" />
<TypeSignature Language="DocId" Value="T:Microsoft.Extensions.AI.AIFunctionDeclaration" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class AIFunctionDeclaration
Inherits AITool" />
<TypeSignature Language="F#" Value="type AIFunctionDeclaration = class
 inherit AITool" />
<TypeSignature Language="C++ CLI" Value="public ref class AIFunctionDeclaration abstract : Microsoft::Extensions::AI::AITool" />
<AssemblyInfo>
<AssemblyName>Microsoft.Extensions.AI.Abstractions</AssemblyName>
<AssemblyVersion>9.9.0.0</AssemblyVersion>
<AssemblyVersion>9.10.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>10.1.0.0</AssemblyVersion>
<AssemblyVersion>10.2.0.0</AssemblyVersion>
<AssemblyVersion>10.3.0.0</AssemblyVersion>
<AssemblyVersion>10.4.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>Microsoft.Extensions.AI.AITool</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Represents a function that can be described to an AI service.</summary>
<remarks>
<see cref="T:Microsoft.Extensions.AI.AIFunctionDeclaration" /> is the base class for <see cref="T:Microsoft.Extensions.AI.AIFunction" />, which
adds the ability to invoke the function. Components can type test <see cref="T:Microsoft.Extensions.AI.AITool" /> instances
for <see cref="T:Microsoft.Extensions.AI.AIFunctionDeclaration" /> to determine whether they can be described as functions,
and can type test for <see cref="T:Microsoft.Extensions.AI.AIFunction" /> to determine whether they can be invoked.
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected AIFunctionDeclaration ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Extensions.AI.AIFunctionDeclaration.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberSignature Language="C++ CLI" Value="protected:
 AIFunctionDeclaration();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Extensions.AI.Abstractions</AssemblyName>
<AssemblyVersion>10.4.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:Microsoft.Extensions.AI.AIFunctionDeclaration" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="JsonSchema">
<MemberSignature Language="C#" Value="public virtual System.Text.Json.JsonElement JsonSchema { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Text.Json.JsonElement JsonSchema" />
<MemberSignature Language="DocId" Value="P:Microsoft.Extensions.AI.AIFunctionDeclaration.JsonSchema" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property JsonSchema As JsonElement" />
<MemberSignature Language="F#" Value="member this.JsonSchema : System.Text.Json.JsonElement" Usage="Microsoft.Extensions.AI.AIFunctionDeclaration.JsonSchema" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Text::Json::JsonElement JsonSchema { System::Text::Json::JsonElement get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Extensions.AI.Abstractions</AssemblyName>
<AssemblyVersion>10.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Text.Json.JsonElement</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a JSON Schema describing the function and its input parameters.</summary>
<value>To be added.</value>
<remarks>
<para>
When specified, declares a self-contained JSON schema document that describes the function and its input parameters.
A simple example of a JSON schema for a function that adds two numbers together is shown below:
</para>
<code>
{
"type": "object",
"properties": {
"a" : { "type": "number" },
"b" : { "type": ["number","null"], "default": 1 }
},
"required" : ["a"]
}
</code>
<para>
The metadata present in the schema document plays an important role in guiding AI function invocation.
</para>
<para>
When an <see cref="T:Microsoft.Extensions.AI.AIFunction" /> is created via <see cref="T:Microsoft.Extensions.AI.AIFunctionFactory" />, this schema is automatically derived from the
method's parameters using the configured <see cref="T:System.Text.Json.JsonSerializerOptions" /> and <see cref="T:Microsoft.Extensions.AI.AIJsonSchemaCreateOptions" />.
</para>
<para>
When no schema is specified, consuming chat clients should assume the "{}" or "true" schema, indicating that any JSON input is admissible.
</para>
</remarks>
</Docs>
</Member>
<Member MemberName="ReturnJsonSchema">
<MemberSignature Language="C#" Value="public virtual System.Text.Json.JsonElement? ReturnJsonSchema { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Nullable`1<valuetype System.Text.Json.JsonElement> ReturnJsonSchema" />
<MemberSignature Language="DocId" Value="P:Microsoft.Extensions.AI.AIFunctionDeclaration.ReturnJsonSchema" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property ReturnJsonSchema As Nullable(Of JsonElement)" />
<MemberSignature Language="F#" Value="member this.ReturnJsonSchema : Nullable<System.Text.Json.JsonElement>" Usage="Microsoft.Extensions.AI.AIFunctionDeclaration.ReturnJsonSchema" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property Nullable<System::Text::Json::JsonElement> ReturnJsonSchema { Nullable<System::Text::Json::JsonElement> get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Extensions.AI.Abstractions</AssemblyName>
<AssemblyVersion>10.4.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Nullable<System.Text.Json.JsonElement></ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a JSON Schema describing the function's return value.</summary>
<value>To be added.</value>
<remarks>
<para>
When an <see cref="T:Microsoft.Extensions.AI.AIFunction" /> is created via <see cref="T:Microsoft.Extensions.AI.AIFunctionFactory" />, this schema is automatically derived from the
method's return type using the configured <see cref="T:System.Text.Json.JsonSerializerOptions" /> and <see cref="T:Microsoft.Extensions.AI.AIJsonSchemaCreateOptions" />.
For methods returning <see cref="T:System.Threading.Tasks.Task`1" /> or <see cref="T:System.Threading.Tasks.ValueTask`1" />, the schema is based on the
unwrapped result type. Return schema generation can be excluded by setting
<see cref="P:Microsoft.Extensions.AI.AIFunctionFactoryOptions.ExcludeResultSchema" /> to <see langword="true" />.
</para>
<para>
A <see langword="null" /> value typically reflects a function that doesn't specify a return schema,
a function that returns <see cref="T:System.Void" />, <see cref="T:System.Threading.Tasks.Task" />, or <see cref="T:System.Threading.Tasks.ValueTask" />,
or a function for which <see cref="P:Microsoft.Extensions.AI.AIFunctionFactoryOptions.ExcludeResultSchema" /> was set to <see langword="true" />.
</para>
</remarks>
</Docs>
</Member>
</Members>
</Type>