openai/openai-dotnet

Public

mirrored from https://github.com/openai/openai-dotnetAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/customize-openairesponsescontext-attribute

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

OpenAI.Responses/src/Generated/OpenAIResponsesModelFactory.cs

275lines · modecode

1// <auto-generated/>
2
3#nullable disable
4
5using System;
6using System.Collections.Generic;
7using System.Linq;
8
9namespace OpenAI.Responses
10{
11 public static partial class OpenAIResponsesModelFactory
12 {
13 public static CreateResponseOptions CreateResponseOptions(IDictionary<string, string> metadata = default, float? temperature = default, int? topLogProbabilityCount = default, float? topP = default, string endUserId = default, string safetyIdentifier = default, ResponseServiceTier? serviceTier = default, string previousResponseId = default, string model = default, ResponseReasoningOptions reasoningOptions = default, bool? backgroundModeEnabled = default, int? maxOutputTokenCount = default, int? maxToolCallCount = default, ResponseTextOptions textOptions = default, IEnumerable<ResponseTool> tools = default, ResponseToolChoice toolChoice = default, ResponseTruncationMode? truncationMode = default, IEnumerable<ResponseItem> inputItems = default, IEnumerable<IncludedResponseProperty> includedProperties = default, bool? parallelToolCallsEnabled = default, bool? storedOutputEnabled = default, string instructions = default, bool? streamingEnabled = default, ResponseConversationOptions conversationOptions = default)
14 {
15 metadata ??= new ChangeTrackingDictionary<string, string>();
16 tools ??= new ChangeTrackingList<ResponseTool>();
17 inputItems ??= new ChangeTrackingList<ResponseItem>();
18 includedProperties ??= new ChangeTrackingList<IncludedResponseProperty>();
19
20 return new CreateResponseOptions(
21 metadata,
22 temperature,
23 topLogProbabilityCount,
24 topP,
25 endUserId,
26 safetyIdentifier,
27 serviceTier,
28 previousResponseId,
29 model,
30 reasoningOptions,
31 backgroundModeEnabled,
32 maxOutputTokenCount,
33 maxToolCallCount,
34 textOptions,
35 tools.ToList(),
36 toolChoice,
37 truncationMode,
38 inputItems.ToList(),
39 includedProperties.ToList(),
40 parallelToolCallsEnabled,
41 storedOutputEnabled,
42 instructions,
43 streamingEnabled,
44 conversationOptions,
45 default);
46 }
47
48 public static ResponseTextOptions ResponseTextOptions(ResponseTextFormat textFormat = default)
49 {
50 return new ResponseTextOptions(textFormat, default);
51 }
52
53 public static FileSearchToolRankingOptions FileSearchToolRankingOptions(FileSearchToolRanker? ranker = default, float? scoreThreshold = default)
54 {
55 return new FileSearchToolRankingOptions(ranker, scoreThreshold, default);
56 }
57
58 public static WebSearchToolFilters WebSearchToolFilters(IEnumerable<string> allowedDomains = default)
59 {
60 allowedDomains ??= new ChangeTrackingList<string>();
61
62 return new WebSearchToolFilters(allowedDomains.ToList(), default);
63 }
64
65 public static ImageGenerationToolInputImageMask ImageGenerationToolInputImageMask(string imageUri = default, string fileId = default)
66 {
67 return new ImageGenerationToolInputImageMask(imageUri, fileId, default);
68 }
69
70 public static McpToolFilter McpToolFilter(IEnumerable<string> toolNames = default, bool? isReadOnly = default)
71 {
72 toolNames ??= new ChangeTrackingList<string>();
73
74 return new McpToolFilter(toolNames.ToList(), isReadOnly, default);
75 }
76
77 public static ResponseMessageAnnotation ResponseMessageAnnotation(string kind = default)
78 {
79 return new InternalUnknownAnnotation(kind.ToResponseMessageAnnotationKind(), default);
80 }
81
82 public static FileCitationMessageAnnotation FileCitationMessageAnnotation(string fileId = default, int index = default, string filename = default)
83 {
84 return new FileCitationMessageAnnotation(ResponseMessageAnnotationKind.FileCitation, default, fileId, index, filename);
85 }
86
87 public static UriCitationMessageAnnotation UriCitationMessageAnnotation(Uri uri = default, int startIndex = default, int endIndex = default, string title = default)
88 {
89 return new UriCitationMessageAnnotation(
90 ResponseMessageAnnotationKind.UriCitation,
91 default,
92 uri,
93 startIndex,
94 endIndex,
95 title);
96 }
97
98 public static ContainerFileCitationMessageAnnotation ContainerFileCitationMessageAnnotation(string containerId = default, string fileId = default, int startIndex = default, int endIndex = default, string filename = default)
99 {
100 return new ContainerFileCitationMessageAnnotation(
101 ResponseMessageAnnotationKind.ContainerFileCitation,
102 default,
103 containerId,
104 fileId,
105 startIndex,
106 endIndex,
107 filename);
108 }
109
110 public static FilePathMessageAnnotation FilePathMessageAnnotation(string fileId = default, int index = default)
111 {
112 return new FilePathMessageAnnotation(ResponseMessageAnnotationKind.FilePath, default, fileId, index);
113 }
114
115 public static FileSearchCallResult FileSearchCallResult(string fileId = default, string text = default, string filename = default, IDictionary<string, BinaryData> attributes = default, float? score = default)
116 {
117 attributes ??= new ChangeTrackingDictionary<string, BinaryData>();
118
119 return new FileSearchCallResult(
120 fileId,
121 text,
122 filename,
123 attributes,
124 score,
125 default);
126 }
127
128 public static ComputerCallAction ComputerCallAction(string kind = default)
129 {
130 return new InternalUnknownComputerAction(kind.ToComputerCallActionKind(), default);
131 }
132
133 public static ComputerCallSafetyCheck ComputerCallSafetyCheck(string id = default, string code = default, string message = default)
134 {
135 return new ComputerCallSafetyCheck(id, code, message, default);
136 }
137
138 public static McpToolDefinition McpToolDefinition(string name = default, string description = default, BinaryData inputSchema = default, BinaryData annotations = default)
139 {
140 return new McpToolDefinition(name, description, inputSchema, annotations, default);
141 }
142
143 public static ResponseConversationOptions ResponseConversationOptions(string conversationId = default)
144 {
145 return new ResponseConversationOptions(conversationId, default);
146 }
147
148 public static ResponseResult ResponseResult(IDictionary<string, string> metadata = default, float? temperature = default, int? topLogProbabilityCount = default, float? topP = default, string endUserId = default, string safetyIdentifier = default, ResponseServiceTier? serviceTier = default, string previousResponseId = default, string model = default, ResponseReasoningOptions reasoningOptions = default, bool? backgroundModeEnabled = default, int? maxOutputTokenCount = default, int? maxToolCallCount = default, ResponseTextOptions textOptions = default, IEnumerable<ResponseTool> tools = default, ResponseToolChoice toolChoice = default, ResponseTruncationMode? truncationMode = default, string id = default, ResponseStatus? status = default, DateTimeOffset createdAt = default, ResponseError error = default, ResponseIncompleteStatusDetails incompleteStatusDetails = default, IEnumerable<ResponseItem> outputItems = default, IEnumerable<ResponseItem> instructions = default, ResponseTokenUsage usage = default, bool parallelToolCallsEnabled = default, ResponseConversationOptions conversationOptions = default)
149 {
150 metadata ??= new ChangeTrackingDictionary<string, string>();
151 tools ??= new ChangeTrackingList<ResponseTool>();
152 outputItems ??= new ChangeTrackingList<ResponseItem>();
153 instructions ??= new ChangeTrackingList<ResponseItem>();
154
155 return new ResponseResult(
156 metadata,
157 temperature,
158 topLogProbabilityCount,
159 topP,
160 endUserId,
161 safetyIdentifier,
162 serviceTier,
163 previousResponseId,
164 model,
165 reasoningOptions,
166 backgroundModeEnabled,
167 maxOutputTokenCount,
168 maxToolCallCount,
169 textOptions,
170 tools.ToList(),
171 toolChoice,
172 truncationMode,
173 id,
174 "response",
175 status,
176 createdAt,
177 error,
178 incompleteStatusDetails,
179 outputItems.ToList(),
180 instructions.ToList(),
181 usage,
182 parallelToolCallsEnabled,
183 conversationOptions,
184 default);
185 }
186
187 public static ResponseError ResponseError(ResponseErrorCode code = default, string message = default)
188 {
189 return new ResponseError(code, message, default);
190 }
191
192 public static ResponseIncompleteStatusDetails ResponseIncompleteStatusDetails(ResponseIncompleteStatusReason? reason = default)
193 {
194 return new ResponseIncompleteStatusDetails(reason, default);
195 }
196
197 public static ResponseTokenUsage ResponseTokenUsage(int inputTokenCount = default, ResponseInputTokenUsageDetails inputTokenDetails = default, int outputTokenCount = default, ResponseOutputTokenUsageDetails outputTokenDetails = default, int totalTokenCount = default)
198 {
199 return new ResponseTokenUsage(
200 inputTokenCount,
201 inputTokenDetails,
202 outputTokenCount,
203 outputTokenDetails,
204 totalTokenCount,
205 default);
206 }
207
208 public static ResponseInputTokenUsageDetails ResponseInputTokenUsageDetails(int cachedTokenCount = default)
209 {
210 return new ResponseInputTokenUsageDetails(cachedTokenCount, default);
211 }
212
213 public static ResponseOutputTokenUsageDetails ResponseOutputTokenUsageDetails(int reasoningTokenCount = default)
214 {
215 return new ResponseOutputTokenUsageDetails(reasoningTokenCount, default);
216 }
217
218 public static ResponseDeletionResult ResponseDeletionResult(string responseId = default, bool deleted = default)
219 {
220 return new ResponseDeletionResult(responseId, "response.deleted", deleted, default);
221 }
222
223 public static ResponseItemCollectionPage ResponseItemCollectionPage(IEnumerable<ResponseItem> data = default, bool hasMore = default, string firstId = default, string lastId = default)
224 {
225 data ??= new ChangeTrackingList<ResponseItem>();
226
227 return new ResponseItemCollectionPage(
228 "list",
229 data.ToList(),
230 hasMore,
231 firstId,
232 lastId,
233 default);
234 }
235
236 public static ResponseItemCollectionOptions ResponseItemCollectionOptions(string responseId = default, string afterId = default, string beforeId = default, int? pageSizeLimit = default, ResponseItemCollectionOrder? order = default)
237 {
238 return new ResponseItemCollectionOptions(
239 responseId,
240 afterId,
241 beforeId,
242 pageSizeLimit,
243 order,
244 additionalBinaryDataProperties: null);
245 }
246
247 public static GetResponseOptions GetResponseOptions(string responseId = default, int? startingAfter = default, bool? includeObfuscation = default, IEnumerable<IncludedResponseProperty> includedProperties = default, bool? streamingEnabled = default)
248 {
249 includedProperties ??= new ChangeTrackingList<IncludedResponseProperty>();
250
251 return new GetResponseOptions(
252 responseId,
253 startingAfter,
254 includeObfuscation,
255 includedProperties.ToList(),
256 streamingEnabled,
257 default);
258 }
259
260 public static CustomMcpToolCallApprovalPolicy CustomMcpToolCallApprovalPolicy(McpToolFilter toolsAlwaysRequiringApproval = default, McpToolFilter toolsNeverRequiringApproval = default)
261 {
262 return new CustomMcpToolCallApprovalPolicy(toolsAlwaysRequiringApproval, toolsNeverRequiringApproval, default);
263 }
264
265 public static McpToolCallApprovalPolicy McpToolCallApprovalPolicy(GlobalMcpToolCallApprovalPolicy? globalPolicy = default, CustomMcpToolCallApprovalPolicy customPolicy = default)
266 {
267 return new McpToolCallApprovalPolicy(globalPolicy, customPolicy, default);
268 }
269
270 public static CodeInterpreterToolContainer CodeInterpreterToolContainer(string containerId = default, CodeInterpreterToolContainerConfiguration containerConfiguration = default)
271 {
272 return new CodeInterpreterToolContainer(containerId, containerConfiguration, default);
273 }
274 }
275}
276