go/resources/$shared/index.md +0 −966 deleted
File Deleted View Diff
1# Shared
2
3## Domain Types
4
5### All Models
6
7- `type AllModels interface{…}`
8
9 - `string`
10
11 - `type ChatModel string`
12
13 - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"`
14
15 - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"`
16
17 - `const ChatModelGPT5_4Nano ChatModel = "gpt-5.4-nano"`
18
19 - `const ChatModelGPT5_4Mini2026_03_17 ChatModel = "gpt-5.4-mini-2026-03-17"`
20
21 - `const ChatModelGPT5_4Nano2026_03_17 ChatModel = "gpt-5.4-nano-2026-03-17"`
22
23 - `const ChatModelGPT5_3ChatLatest ChatModel = "gpt-5.3-chat-latest"`
24
25 - `const ChatModelGPT5_2 ChatModel = "gpt-5.2"`
26
27 - `const ChatModelGPT5_2_2025_12_11 ChatModel = "gpt-5.2-2025-12-11"`
28
29 - `const ChatModelGPT5_2ChatLatest ChatModel = "gpt-5.2-chat-latest"`
30
31 - `const ChatModelGPT5_2Pro ChatModel = "gpt-5.2-pro"`
32
33 - `const ChatModelGPT5_2Pro2025_12_11 ChatModel = "gpt-5.2-pro-2025-12-11"`
34
35 - `const ChatModelGPT5_1 ChatModel = "gpt-5.1"`
36
37 - `const ChatModelGPT5_1_2025_11_13 ChatModel = "gpt-5.1-2025-11-13"`
38
39 - `const ChatModelGPT5_1Codex ChatModel = "gpt-5.1-codex"`
40
41 - `const ChatModelGPT5_1Mini ChatModel = "gpt-5.1-mini"`
42
43 - `const ChatModelGPT5_1ChatLatest ChatModel = "gpt-5.1-chat-latest"`
44
45 - `const ChatModelGPT5 ChatModel = "gpt-5"`
46
47 - `const ChatModelGPT5Mini ChatModel = "gpt-5-mini"`
48
49 - `const ChatModelGPT5Nano ChatModel = "gpt-5-nano"`
50
51 - `const ChatModelGPT5_2025_08_07 ChatModel = "gpt-5-2025-08-07"`
52
53 - `const ChatModelGPT5Mini2025_08_07 ChatModel = "gpt-5-mini-2025-08-07"`
54
55 - `const ChatModelGPT5Nano2025_08_07 ChatModel = "gpt-5-nano-2025-08-07"`
56
57 - `const ChatModelGPT5ChatLatest ChatModel = "gpt-5-chat-latest"`
58
59 - `const ChatModelGPT4_1 ChatModel = "gpt-4.1"`
60
61 - `const ChatModelGPT4_1Mini ChatModel = "gpt-4.1-mini"`
62
63 - `const ChatModelGPT4_1Nano ChatModel = "gpt-4.1-nano"`
64
65 - `const ChatModelGPT4_1_2025_04_14 ChatModel = "gpt-4.1-2025-04-14"`
66
67 - `const ChatModelGPT4_1Mini2025_04_14 ChatModel = "gpt-4.1-mini-2025-04-14"`
68
69 - `const ChatModelGPT4_1Nano2025_04_14 ChatModel = "gpt-4.1-nano-2025-04-14"`
70
71 - `const ChatModelO4Mini ChatModel = "o4-mini"`
72
73 - `const ChatModelO4Mini2025_04_16 ChatModel = "o4-mini-2025-04-16"`
74
75 - `const ChatModelO3 ChatModel = "o3"`
76
77 - `const ChatModelO3_2025_04_16 ChatModel = "o3-2025-04-16"`
78
79 - `const ChatModelO3Mini ChatModel = "o3-mini"`
80
81 - `const ChatModelO3Mini2025_01_31 ChatModel = "o3-mini-2025-01-31"`
82
83 - `const ChatModelO1 ChatModel = "o1"`
84
85 - `const ChatModelO1_2024_12_17 ChatModel = "o1-2024-12-17"`
86
87 - `const ChatModelO1Preview ChatModel = "o1-preview"`
88
89 - `const ChatModelO1Preview2024_09_12 ChatModel = "o1-preview-2024-09-12"`
90
91 - `const ChatModelO1Mini ChatModel = "o1-mini"`
92
93 - `const ChatModelO1Mini2024_09_12 ChatModel = "o1-mini-2024-09-12"`
94
95 - `const ChatModelGPT4o ChatModel = "gpt-4o"`
96
97 - `const ChatModelGPT4o2024_11_20 ChatModel = "gpt-4o-2024-11-20"`
98
99 - `const ChatModelGPT4o2024_08_06 ChatModel = "gpt-4o-2024-08-06"`
100
101 - `const ChatModelGPT4o2024_05_13 ChatModel = "gpt-4o-2024-05-13"`
102
103 - `const ChatModelGPT4oAudioPreview ChatModel = "gpt-4o-audio-preview"`
104
105 - `const ChatModelGPT4oAudioPreview2024_10_01 ChatModel = "gpt-4o-audio-preview-2024-10-01"`
106
107 - `const ChatModelGPT4oAudioPreview2024_12_17 ChatModel = "gpt-4o-audio-preview-2024-12-17"`
108
109 - `const ChatModelGPT4oAudioPreview2025_06_03 ChatModel = "gpt-4o-audio-preview-2025-06-03"`
110
111 - `const ChatModelGPT4oMiniAudioPreview ChatModel = "gpt-4o-mini-audio-preview"`
112
113 - `const ChatModelGPT4oMiniAudioPreview2024_12_17 ChatModel = "gpt-4o-mini-audio-preview-2024-12-17"`
114
115 - `const ChatModelGPT4oSearchPreview ChatModel = "gpt-4o-search-preview"`
116
117 - `const ChatModelGPT4oMiniSearchPreview ChatModel = "gpt-4o-mini-search-preview"`
118
119 - `const ChatModelGPT4oSearchPreview2025_03_11 ChatModel = "gpt-4o-search-preview-2025-03-11"`
120
121 - `const ChatModelGPT4oMiniSearchPreview2025_03_11 ChatModel = "gpt-4o-mini-search-preview-2025-03-11"`
122
123 - `const ChatModelChatgpt4oLatest ChatModel = "chatgpt-4o-latest"`
124
125 - `const ChatModelCodexMiniLatest ChatModel = "codex-mini-latest"`
126
127 - `const ChatModelGPT4oMini ChatModel = "gpt-4o-mini"`
128
129 - `const ChatModelGPT4oMini2024_07_18 ChatModel = "gpt-4o-mini-2024-07-18"`
130
131 - `const ChatModelGPT4Turbo ChatModel = "gpt-4-turbo"`
132
133 - `const ChatModelGPT4Turbo2024_04_09 ChatModel = "gpt-4-turbo-2024-04-09"`
134
135 - `const ChatModelGPT4_0125Preview ChatModel = "gpt-4-0125-preview"`
136
137 - `const ChatModelGPT4TurboPreview ChatModel = "gpt-4-turbo-preview"`
138
139 - `const ChatModelGPT4_1106Preview ChatModel = "gpt-4-1106-preview"`
140
141 - `const ChatModelGPT4VisionPreview ChatModel = "gpt-4-vision-preview"`
142
143 - `const ChatModelGPT4 ChatModel = "gpt-4"`
144
145 - `const ChatModelGPT4_0314 ChatModel = "gpt-4-0314"`
146
147 - `const ChatModelGPT4_0613 ChatModel = "gpt-4-0613"`
148
149 - `const ChatModelGPT4_32k ChatModel = "gpt-4-32k"`
150
151 - `const ChatModelGPT4_32k0314 ChatModel = "gpt-4-32k-0314"`
152
153 - `const ChatModelGPT4_32k0613 ChatModel = "gpt-4-32k-0613"`
154
155 - `const ChatModelGPT3_5Turbo ChatModel = "gpt-3.5-turbo"`
156
157 - `const ChatModelGPT3_5Turbo16k ChatModel = "gpt-3.5-turbo-16k"`
158
159 - `const ChatModelGPT3_5Turbo0301 ChatModel = "gpt-3.5-turbo-0301"`
160
161 - `const ChatModelGPT3_5Turbo0613 ChatModel = "gpt-3.5-turbo-0613"`
162
163 - `const ChatModelGPT3_5Turbo1106 ChatModel = "gpt-3.5-turbo-1106"`
164
165 - `const ChatModelGPT3_5Turbo0125 ChatModel = "gpt-3.5-turbo-0125"`
166
167 - `const ChatModelGPT3_5Turbo16k0613 ChatModel = "gpt-3.5-turbo-16k-0613"`
168
169 - `type AllModels string`
170
171 - `const AllModelsO1Pro AllModels = "o1-pro"`
172
173 - `const AllModelsO1Pro2025_03_19 AllModels = "o1-pro-2025-03-19"`
174
175 - `const AllModelsO3Pro AllModels = "o3-pro"`
176
177 - `const AllModelsO3Pro2025_06_10 AllModels = "o3-pro-2025-06-10"`
178
179 - `const AllModelsO3DeepResearch AllModels = "o3-deep-research"`
180
181 - `const AllModelsO3DeepResearch2025_06_26 AllModels = "o3-deep-research-2025-06-26"`
182
183 - `const AllModelsO4MiniDeepResearch AllModels = "o4-mini-deep-research"`
184
185 - `const AllModelsO4MiniDeepResearch2025_06_26 AllModels = "o4-mini-deep-research-2025-06-26"`
186
187 - `const AllModelsComputerUsePreview AllModels = "computer-use-preview"`
188
189 - `const AllModelsComputerUsePreview2025_03_11 AllModels = "computer-use-preview-2025-03-11"`
190
191 - `const AllModelsGPT5Codex AllModels = "gpt-5-codex"`
192
193 - `const AllModelsGPT5Pro AllModels = "gpt-5-pro"`
194
195 - `const AllModelsGPT5Pro2025_10_06 AllModels = "gpt-5-pro-2025-10-06"`
196
197 - `const AllModelsGPT5_1CodexMax AllModels = "gpt-5.1-codex-max"`
198
199### Chat Model
200
201- `type ChatModel string`
202
203 - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"`
204
205 - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"`
206
207 - `const ChatModelGPT5_4Nano ChatModel = "gpt-5.4-nano"`
208
209 - `const ChatModelGPT5_4Mini2026_03_17 ChatModel = "gpt-5.4-mini-2026-03-17"`
210
211 - `const ChatModelGPT5_4Nano2026_03_17 ChatModel = "gpt-5.4-nano-2026-03-17"`
212
213 - `const ChatModelGPT5_3ChatLatest ChatModel = "gpt-5.3-chat-latest"`
214
215 - `const ChatModelGPT5_2 ChatModel = "gpt-5.2"`
216
217 - `const ChatModelGPT5_2_2025_12_11 ChatModel = "gpt-5.2-2025-12-11"`
218
219 - `const ChatModelGPT5_2ChatLatest ChatModel = "gpt-5.2-chat-latest"`
220
221 - `const ChatModelGPT5_2Pro ChatModel = "gpt-5.2-pro"`
222
223 - `const ChatModelGPT5_2Pro2025_12_11 ChatModel = "gpt-5.2-pro-2025-12-11"`
224
225 - `const ChatModelGPT5_1 ChatModel = "gpt-5.1"`
226
227 - `const ChatModelGPT5_1_2025_11_13 ChatModel = "gpt-5.1-2025-11-13"`
228
229 - `const ChatModelGPT5_1Codex ChatModel = "gpt-5.1-codex"`
230
231 - `const ChatModelGPT5_1Mini ChatModel = "gpt-5.1-mini"`
232
233 - `const ChatModelGPT5_1ChatLatest ChatModel = "gpt-5.1-chat-latest"`
234
235 - `const ChatModelGPT5 ChatModel = "gpt-5"`
236
237 - `const ChatModelGPT5Mini ChatModel = "gpt-5-mini"`
238
239 - `const ChatModelGPT5Nano ChatModel = "gpt-5-nano"`
240
241 - `const ChatModelGPT5_2025_08_07 ChatModel = "gpt-5-2025-08-07"`
242
243 - `const ChatModelGPT5Mini2025_08_07 ChatModel = "gpt-5-mini-2025-08-07"`
244
245 - `const ChatModelGPT5Nano2025_08_07 ChatModel = "gpt-5-nano-2025-08-07"`
246
247 - `const ChatModelGPT5ChatLatest ChatModel = "gpt-5-chat-latest"`
248
249 - `const ChatModelGPT4_1 ChatModel = "gpt-4.1"`
250
251 - `const ChatModelGPT4_1Mini ChatModel = "gpt-4.1-mini"`
252
253 - `const ChatModelGPT4_1Nano ChatModel = "gpt-4.1-nano"`
254
255 - `const ChatModelGPT4_1_2025_04_14 ChatModel = "gpt-4.1-2025-04-14"`
256
257 - `const ChatModelGPT4_1Mini2025_04_14 ChatModel = "gpt-4.1-mini-2025-04-14"`
258
259 - `const ChatModelGPT4_1Nano2025_04_14 ChatModel = "gpt-4.1-nano-2025-04-14"`
260
261 - `const ChatModelO4Mini ChatModel = "o4-mini"`
262
263 - `const ChatModelO4Mini2025_04_16 ChatModel = "o4-mini-2025-04-16"`
264
265 - `const ChatModelO3 ChatModel = "o3"`
266
267 - `const ChatModelO3_2025_04_16 ChatModel = "o3-2025-04-16"`
268
269 - `const ChatModelO3Mini ChatModel = "o3-mini"`
270
271 - `const ChatModelO3Mini2025_01_31 ChatModel = "o3-mini-2025-01-31"`
272
273 - `const ChatModelO1 ChatModel = "o1"`
274
275 - `const ChatModelO1_2024_12_17 ChatModel = "o1-2024-12-17"`
276
277 - `const ChatModelO1Preview ChatModel = "o1-preview"`
278
279 - `const ChatModelO1Preview2024_09_12 ChatModel = "o1-preview-2024-09-12"`
280
281 - `const ChatModelO1Mini ChatModel = "o1-mini"`
282
283 - `const ChatModelO1Mini2024_09_12 ChatModel = "o1-mini-2024-09-12"`
284
285 - `const ChatModelGPT4o ChatModel = "gpt-4o"`
286
287 - `const ChatModelGPT4o2024_11_20 ChatModel = "gpt-4o-2024-11-20"`
288
289 - `const ChatModelGPT4o2024_08_06 ChatModel = "gpt-4o-2024-08-06"`
290
291 - `const ChatModelGPT4o2024_05_13 ChatModel = "gpt-4o-2024-05-13"`
292
293 - `const ChatModelGPT4oAudioPreview ChatModel = "gpt-4o-audio-preview"`
294
295 - `const ChatModelGPT4oAudioPreview2024_10_01 ChatModel = "gpt-4o-audio-preview-2024-10-01"`
296
297 - `const ChatModelGPT4oAudioPreview2024_12_17 ChatModel = "gpt-4o-audio-preview-2024-12-17"`
298
299 - `const ChatModelGPT4oAudioPreview2025_06_03 ChatModel = "gpt-4o-audio-preview-2025-06-03"`
300
301 - `const ChatModelGPT4oMiniAudioPreview ChatModel = "gpt-4o-mini-audio-preview"`
302
303 - `const ChatModelGPT4oMiniAudioPreview2024_12_17 ChatModel = "gpt-4o-mini-audio-preview-2024-12-17"`
304
305 - `const ChatModelGPT4oSearchPreview ChatModel = "gpt-4o-search-preview"`
306
307 - `const ChatModelGPT4oMiniSearchPreview ChatModel = "gpt-4o-mini-search-preview"`
308
309 - `const ChatModelGPT4oSearchPreview2025_03_11 ChatModel = "gpt-4o-search-preview-2025-03-11"`
310
311 - `const ChatModelGPT4oMiniSearchPreview2025_03_11 ChatModel = "gpt-4o-mini-search-preview-2025-03-11"`
312
313 - `const ChatModelChatgpt4oLatest ChatModel = "chatgpt-4o-latest"`
314
315 - `const ChatModelCodexMiniLatest ChatModel = "codex-mini-latest"`
316
317 - `const ChatModelGPT4oMini ChatModel = "gpt-4o-mini"`
318
319 - `const ChatModelGPT4oMini2024_07_18 ChatModel = "gpt-4o-mini-2024-07-18"`
320
321 - `const ChatModelGPT4Turbo ChatModel = "gpt-4-turbo"`
322
323 - `const ChatModelGPT4Turbo2024_04_09 ChatModel = "gpt-4-turbo-2024-04-09"`
324
325 - `const ChatModelGPT4_0125Preview ChatModel = "gpt-4-0125-preview"`
326
327 - `const ChatModelGPT4TurboPreview ChatModel = "gpt-4-turbo-preview"`
328
329 - `const ChatModelGPT4_1106Preview ChatModel = "gpt-4-1106-preview"`
330
331 - `const ChatModelGPT4VisionPreview ChatModel = "gpt-4-vision-preview"`
332
333 - `const ChatModelGPT4 ChatModel = "gpt-4"`
334
335 - `const ChatModelGPT4_0314 ChatModel = "gpt-4-0314"`
336
337 - `const ChatModelGPT4_0613 ChatModel = "gpt-4-0613"`
338
339 - `const ChatModelGPT4_32k ChatModel = "gpt-4-32k"`
340
341 - `const ChatModelGPT4_32k0314 ChatModel = "gpt-4-32k-0314"`
342
343 - `const ChatModelGPT4_32k0613 ChatModel = "gpt-4-32k-0613"`
344
345 - `const ChatModelGPT3_5Turbo ChatModel = "gpt-3.5-turbo"`
346
347 - `const ChatModelGPT3_5Turbo16k ChatModel = "gpt-3.5-turbo-16k"`
348
349 - `const ChatModelGPT3_5Turbo0301 ChatModel = "gpt-3.5-turbo-0301"`
350
351 - `const ChatModelGPT3_5Turbo0613 ChatModel = "gpt-3.5-turbo-0613"`
352
353 - `const ChatModelGPT3_5Turbo1106 ChatModel = "gpt-3.5-turbo-1106"`
354
355 - `const ChatModelGPT3_5Turbo0125 ChatModel = "gpt-3.5-turbo-0125"`
356
357 - `const ChatModelGPT3_5Turbo16k0613 ChatModel = "gpt-3.5-turbo-16k-0613"`
358
359### Comparison Filter
360
361- `type ComparisonFilter struct{…}`
362
363 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
364
365 - `Key string`
366
367 The key to compare against the value.
368
369 - `Type ComparisonFilterType`
370
371 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
372
373 - `eq`: equals
374 - `ne`: not equal
375 - `gt`: greater than
376 - `gte`: greater than or equal
377 - `lt`: less than
378 - `lte`: less than or equal
379 - `in`: in
380 - `nin`: not in
381
382 - `const ComparisonFilterTypeEq ComparisonFilterType = "eq"`
383
384 - `const ComparisonFilterTypeNe ComparisonFilterType = "ne"`
385
386 - `const ComparisonFilterTypeGt ComparisonFilterType = "gt"`
387
388 - `const ComparisonFilterTypeGte ComparisonFilterType = "gte"`
389
390 - `const ComparisonFilterTypeLt ComparisonFilterType = "lt"`
391
392 - `const ComparisonFilterTypeLte ComparisonFilterType = "lte"`
393
394 - `const ComparisonFilterTypeIn ComparisonFilterType = "in"`
395
396 - `const ComparisonFilterTypeNin ComparisonFilterType = "nin"`
397
398 - `Value ComparisonFilterValueUnion`
399
400 The value to compare against the attribute key; supports string, number, or boolean types.
401
402 - `string`
403
404 - `float64`
405
406 - `bool`
407
408 - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion`
409
410 - `string`
411
412 - `float64`
413
414### Compound Filter
415
416- `type CompoundFilter struct{…}`
417
418 Combine multiple filters using `and` or `or`.
419
420 - `Filters []ComparisonFilter`
421
422 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
423
424 - `type ComparisonFilter struct{…}`
425
426 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
427
428 - `Key string`
429
430 The key to compare against the value.
431
432 - `Type ComparisonFilterType`
433
434 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
435
436 - `eq`: equals
437 - `ne`: not equal
438 - `gt`: greater than
439 - `gte`: greater than or equal
440 - `lt`: less than
441 - `lte`: less than or equal
442 - `in`: in
443 - `nin`: not in
444
445 - `const ComparisonFilterTypeEq ComparisonFilterType = "eq"`
446
447 - `const ComparisonFilterTypeNe ComparisonFilterType = "ne"`
448
449 - `const ComparisonFilterTypeGt ComparisonFilterType = "gt"`
450
451 - `const ComparisonFilterTypeGte ComparisonFilterType = "gte"`
452
453 - `const ComparisonFilterTypeLt ComparisonFilterType = "lt"`
454
455 - `const ComparisonFilterTypeLte ComparisonFilterType = "lte"`
456
457 - `const ComparisonFilterTypeIn ComparisonFilterType = "in"`
458
459 - `const ComparisonFilterTypeNin ComparisonFilterType = "nin"`
460
461 - `Value ComparisonFilterValueUnion`
462
463 The value to compare against the attribute key; supports string, number, or boolean types.
464
465 - `string`
466
467 - `float64`
468
469 - `bool`
470
471 - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion`
472
473 - `string`
474
475 - `float64`
476
477 - `Type CompoundFilterType`
478
479 Type of operation: `and` or `or`.
480
481 - `const CompoundFilterTypeAnd CompoundFilterType = "and"`
482
483 - `const CompoundFilterTypeOr CompoundFilterType = "or"`
484
485### Custom Tool Input Format
486
487- `type CustomToolInputFormatUnion interface{…}`
488
489 The input format for the custom tool. Default is unconstrained text.
490
491 - `type CustomToolInputFormatText struct{…}`
492
493 Unconstrained free-form text.
494
495 - `Type Text`
496
497 Unconstrained text format. Always `text`.
498
499 - `const TextText Text = "text"`
500
501 - `type CustomToolInputFormatGrammar struct{…}`
502
503 A grammar defined by the user.
504
505 - `Definition string`
506
507 The grammar definition.
508
509 - `Syntax string`
510
511 The syntax of the grammar definition. One of `lark` or `regex`.
512
513 - `const CustomToolInputFormatGrammarSyntaxLark CustomToolInputFormatGrammarSyntax = "lark"`
514
515 - `const CustomToolInputFormatGrammarSyntaxRegex CustomToolInputFormatGrammarSyntax = "regex"`
516
517 - `Type Grammar`
518
519 Grammar format. Always `grammar`.
520
521 - `const GrammarGrammar Grammar = "grammar"`
522
523### Error Object
524
525- `type ErrorObject struct{…}`
526
527 - `Code string`
528
529 - `Message string`
530
531 - `Param string`
532
533 - `Type string`
534
535### Function Definition
536
537- `type FunctionDefinition struct{…}`
538
539 - `Name string`
540
541 The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
542
543 - `Description string`
544
545 A description of what the function does, used by the model to choose when and how to call the function.
546
547 - `Parameters FunctionParameters`
548
549 The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
550
551 Omitting `parameters` defines a function with an empty parameter list.
552
553 - `Strict bool`
554
555 Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling).
556
557### Function Parameters
558
559- `type FunctionParameters map[string, any]`
560
561 The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
562
563 Omitting `parameters` defines a function with an empty parameter list.
564
565### Metadata
566
567- `type Metadata map[string, string]`
568
569 Set of 16 key-value pairs that can be attached to an object. This can be
570 useful for storing additional information about the object in a structured
571 format, and querying for objects via API or the dashboard.
572
573 Keys are strings with a maximum length of 64 characters. Values are strings
574 with a maximum length of 512 characters.
575
576### OAuth Error Code
577
578- `type OAuthErrorCode interface{…}`
579
580 - `type OAuthErrorCode string`
581
582 - `const OAuthErrorCodeInvalidGrant OAuthErrorCode = "invalid_grant"`
583
584 - `const OAuthErrorCodeInvalidSubjectToken OAuthErrorCode = "invalid_subject_token"`
585
586 - `string`
587
588### Reasoning
589
590- `type Reasoning struct{…}`
591
592 **gpt-5 and o-series models only**
593
594 Configuration options for
595 [reasoning models](https://platform.openai.com/docs/guides/reasoning).
596
597 - `Effort ReasoningEffort`
598
599 Constrains effort on reasoning for
600 [reasoning models](https://platform.openai.com/docs/guides/reasoning).
601 Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing
602 reasoning effort can result in faster responses and fewer tokens used
603 on reasoning in a response.
604
605 - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
606 - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
607 - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
608 - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
609
610 - `const ReasoningEffortNone ReasoningEffort = "none"`
611
612 - `const ReasoningEffortMinimal ReasoningEffort = "minimal"`
613
614 - `const ReasoningEffortLow ReasoningEffort = "low"`
615
616 - `const ReasoningEffortMedium ReasoningEffort = "medium"`
617
618 - `const ReasoningEffortHigh ReasoningEffort = "high"`
619
620 - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"`
621
622 - `GenerateSummary ReasoningGenerateSummary`
623
624 **Deprecated:** use `summary` instead.
625
626 A summary of the reasoning performed by the model. This can be
627 useful for debugging and understanding the model's reasoning process.
628 One of `auto`, `concise`, or `detailed`.
629
630 - `const ReasoningGenerateSummaryAuto ReasoningGenerateSummary = "auto"`
631
632 - `const ReasoningGenerateSummaryConcise ReasoningGenerateSummary = "concise"`
633
634 - `const ReasoningGenerateSummaryDetailed ReasoningGenerateSummary = "detailed"`
635
636 - `Summary ReasoningSummary`
637
638 A summary of the reasoning performed by the model. This can be
639 useful for debugging and understanding the model's reasoning process.
640 One of `auto`, `concise`, or `detailed`.
641
642 `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.
643
644 - `const ReasoningSummaryAuto ReasoningSummary = "auto"`
645
646 - `const ReasoningSummaryConcise ReasoningSummary = "concise"`
647
648 - `const ReasoningSummaryDetailed ReasoningSummary = "detailed"`
649
650### Reasoning Effort
651
652- `type ReasoningEffort string`
653
654 Constrains effort on reasoning for
655 [reasoning models](https://platform.openai.com/docs/guides/reasoning).
656 Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing
657 reasoning effort can result in faster responses and fewer tokens used
658 on reasoning in a response.
659
660 - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
661 - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
662 - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
663 - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
664
665 - `const ReasoningEffortNone ReasoningEffort = "none"`
666
667 - `const ReasoningEffortMinimal ReasoningEffort = "minimal"`
668
669 - `const ReasoningEffortLow ReasoningEffort = "low"`
670
671 - `const ReasoningEffortMedium ReasoningEffort = "medium"`
672
673 - `const ReasoningEffortHigh ReasoningEffort = "high"`
674
675 - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"`
676
677### Response Format JSON Object
678
679- `type ResponseFormatJSONObject struct{…}`
680
681 JSON object response format. An older method of generating JSON responses.
682 Using `json_schema` is recommended for models that support it. Note that the
683 model will not generate JSON without a system or user message instructing it
684 to do so.
685
686 - `Type JSONObject`
687
688 The type of response format being defined. Always `json_object`.
689
690 - `const JSONObjectJSONObject JSONObject = "json_object"`
691
692### Response Format JSON Schema
693
694- `type ResponseFormatJSONSchema struct{…}`
695
696 JSON Schema response format. Used to generate structured JSON responses.
697 Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).
698
699 - `JSONSchema ResponseFormatJSONSchemaJSONSchema`
700
701 Structured Outputs configuration options, including a JSON Schema.
702
703 - `Name string`
704
705 The name of the response format. Must be a-z, A-Z, 0-9, or contain
706 underscores and dashes, with a maximum length of 64.
707
708 - `Description string`
709
710 A description of what the response format is for, used by the model to
711 determine how to respond in the format.
712
713 - `Schema map[string, any]`
714
715 The schema for the response format, described as a JSON Schema object.
716 Learn how to build JSON schemas [here](https://json-schema.org/).
717
718 - `Strict bool`
719
720 Whether to enable strict schema adherence when generating the output.
721 If set to true, the model will always follow the exact schema defined
722 in the `schema` field. Only a subset of JSON Schema is supported when
723 `strict` is `true`. To learn more, read the [Structured Outputs
724 guide](https://platform.openai.com/docs/guides/structured-outputs).
725
726 - `Type JSONSchema`
727
728 The type of response format being defined. Always `json_schema`.
729
730 - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`
731
732### Response Format Text
733
734- `type ResponseFormatText struct{…}`
735
736 Default response format. Used to generate text responses.
737
738 - `Type Text`
739
740 The type of response format being defined. Always `text`.
741
742 - `const TextText Text = "text"`
743
744### Response Format Text Grammar
745
746- `type ResponseFormatTextGrammar struct{…}`
747
748 A custom grammar for the model to follow when generating text.
749 Learn more in the [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars).
750
751 - `Grammar string`
752
753 The custom grammar for the model to follow.
754
755 - `Type Grammar`
756
757 The type of response format being defined. Always `grammar`.
758
759 - `const GrammarGrammar Grammar = "grammar"`
760
761### Response Format Text Python
762
763- `type ResponseFormatTextPython struct{…}`
764
765 Configure the model to generate valid Python code. See the
766 [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) for more details.
767
768 - `Type Python`
769
770 The type of response format being defined. Always `python`.
771
772 - `const PythonPython Python = "python"`
773
774### Responses Model
775
776- `type ResponsesModel interface{…}`
777
778 - `string`
779
780 - `type ChatModel string`
781
782 - `const ChatModelGPT5_4 ChatModel = "gpt-5.4"`
783
784 - `const ChatModelGPT5_4Mini ChatModel = "gpt-5.4-mini"`
785
786 - `const ChatModelGPT5_4Nano ChatModel = "gpt-5.4-nano"`
787
788 - `const ChatModelGPT5_4Mini2026_03_17 ChatModel = "gpt-5.4-mini-2026-03-17"`
789
790 - `const ChatModelGPT5_4Nano2026_03_17 ChatModel = "gpt-5.4-nano-2026-03-17"`
791
792 - `const ChatModelGPT5_3ChatLatest ChatModel = "gpt-5.3-chat-latest"`
793
794 - `const ChatModelGPT5_2 ChatModel = "gpt-5.2"`
795
796 - `const ChatModelGPT5_2_2025_12_11 ChatModel = "gpt-5.2-2025-12-11"`
797
798 - `const ChatModelGPT5_2ChatLatest ChatModel = "gpt-5.2-chat-latest"`
799
800 - `const ChatModelGPT5_2Pro ChatModel = "gpt-5.2-pro"`
801
802 - `const ChatModelGPT5_2Pro2025_12_11 ChatModel = "gpt-5.2-pro-2025-12-11"`
803
804 - `const ChatModelGPT5_1 ChatModel = "gpt-5.1"`
805
806 - `const ChatModelGPT5_1_2025_11_13 ChatModel = "gpt-5.1-2025-11-13"`
807
808 - `const ChatModelGPT5_1Codex ChatModel = "gpt-5.1-codex"`
809
810 - `const ChatModelGPT5_1Mini ChatModel = "gpt-5.1-mini"`
811
812 - `const ChatModelGPT5_1ChatLatest ChatModel = "gpt-5.1-chat-latest"`
813
814 - `const ChatModelGPT5 ChatModel = "gpt-5"`
815
816 - `const ChatModelGPT5Mini ChatModel = "gpt-5-mini"`
817
818 - `const ChatModelGPT5Nano ChatModel = "gpt-5-nano"`
819
820 - `const ChatModelGPT5_2025_08_07 ChatModel = "gpt-5-2025-08-07"`
821
822 - `const ChatModelGPT5Mini2025_08_07 ChatModel = "gpt-5-mini-2025-08-07"`
823
824 - `const ChatModelGPT5Nano2025_08_07 ChatModel = "gpt-5-nano-2025-08-07"`
825
826 - `const ChatModelGPT5ChatLatest ChatModel = "gpt-5-chat-latest"`
827
828 - `const ChatModelGPT4_1 ChatModel = "gpt-4.1"`
829
830 - `const ChatModelGPT4_1Mini ChatModel = "gpt-4.1-mini"`
831
832 - `const ChatModelGPT4_1Nano ChatModel = "gpt-4.1-nano"`
833
834 - `const ChatModelGPT4_1_2025_04_14 ChatModel = "gpt-4.1-2025-04-14"`
835
836 - `const ChatModelGPT4_1Mini2025_04_14 ChatModel = "gpt-4.1-mini-2025-04-14"`
837
838 - `const ChatModelGPT4_1Nano2025_04_14 ChatModel = "gpt-4.1-nano-2025-04-14"`
839
840 - `const ChatModelO4Mini ChatModel = "o4-mini"`
841
842 - `const ChatModelO4Mini2025_04_16 ChatModel = "o4-mini-2025-04-16"`
843
844 - `const ChatModelO3 ChatModel = "o3"`
845
846 - `const ChatModelO3_2025_04_16 ChatModel = "o3-2025-04-16"`
847
848 - `const ChatModelO3Mini ChatModel = "o3-mini"`
849
850 - `const ChatModelO3Mini2025_01_31 ChatModel = "o3-mini-2025-01-31"`
851
852 - `const ChatModelO1 ChatModel = "o1"`
853
854 - `const ChatModelO1_2024_12_17 ChatModel = "o1-2024-12-17"`
855
856 - `const ChatModelO1Preview ChatModel = "o1-preview"`
857
858 - `const ChatModelO1Preview2024_09_12 ChatModel = "o1-preview-2024-09-12"`
859
860 - `const ChatModelO1Mini ChatModel = "o1-mini"`
861
862 - `const ChatModelO1Mini2024_09_12 ChatModel = "o1-mini-2024-09-12"`
863
864 - `const ChatModelGPT4o ChatModel = "gpt-4o"`
865
866 - `const ChatModelGPT4o2024_11_20 ChatModel = "gpt-4o-2024-11-20"`
867
868 - `const ChatModelGPT4o2024_08_06 ChatModel = "gpt-4o-2024-08-06"`
869
870 - `const ChatModelGPT4o2024_05_13 ChatModel = "gpt-4o-2024-05-13"`
871
872 - `const ChatModelGPT4oAudioPreview ChatModel = "gpt-4o-audio-preview"`
873
874 - `const ChatModelGPT4oAudioPreview2024_10_01 ChatModel = "gpt-4o-audio-preview-2024-10-01"`
875
876 - `const ChatModelGPT4oAudioPreview2024_12_17 ChatModel = "gpt-4o-audio-preview-2024-12-17"`
877
878 - `const ChatModelGPT4oAudioPreview2025_06_03 ChatModel = "gpt-4o-audio-preview-2025-06-03"`
879
880 - `const ChatModelGPT4oMiniAudioPreview ChatModel = "gpt-4o-mini-audio-preview"`
881
882 - `const ChatModelGPT4oMiniAudioPreview2024_12_17 ChatModel = "gpt-4o-mini-audio-preview-2024-12-17"`
883
884 - `const ChatModelGPT4oSearchPreview ChatModel = "gpt-4o-search-preview"`
885
886 - `const ChatModelGPT4oMiniSearchPreview ChatModel = "gpt-4o-mini-search-preview"`
887
888 - `const ChatModelGPT4oSearchPreview2025_03_11 ChatModel = "gpt-4o-search-preview-2025-03-11"`
889
890 - `const ChatModelGPT4oMiniSearchPreview2025_03_11 ChatModel = "gpt-4o-mini-search-preview-2025-03-11"`
891
892 - `const ChatModelChatgpt4oLatest ChatModel = "chatgpt-4o-latest"`
893
894 - `const ChatModelCodexMiniLatest ChatModel = "codex-mini-latest"`
895
896 - `const ChatModelGPT4oMini ChatModel = "gpt-4o-mini"`
897
898 - `const ChatModelGPT4oMini2024_07_18 ChatModel = "gpt-4o-mini-2024-07-18"`
899
900 - `const ChatModelGPT4Turbo ChatModel = "gpt-4-turbo"`
901
902 - `const ChatModelGPT4Turbo2024_04_09 ChatModel = "gpt-4-turbo-2024-04-09"`
903
904 - `const ChatModelGPT4_0125Preview ChatModel = "gpt-4-0125-preview"`
905
906 - `const ChatModelGPT4TurboPreview ChatModel = "gpt-4-turbo-preview"`
907
908 - `const ChatModelGPT4_1106Preview ChatModel = "gpt-4-1106-preview"`
909
910 - `const ChatModelGPT4VisionPreview ChatModel = "gpt-4-vision-preview"`
911
912 - `const ChatModelGPT4 ChatModel = "gpt-4"`
913
914 - `const ChatModelGPT4_0314 ChatModel = "gpt-4-0314"`
915
916 - `const ChatModelGPT4_0613 ChatModel = "gpt-4-0613"`
917
918 - `const ChatModelGPT4_32k ChatModel = "gpt-4-32k"`
919
920 - `const ChatModelGPT4_32k0314 ChatModel = "gpt-4-32k-0314"`
921
922 - `const ChatModelGPT4_32k0613 ChatModel = "gpt-4-32k-0613"`
923
924 - `const ChatModelGPT3_5Turbo ChatModel = "gpt-3.5-turbo"`
925
926 - `const ChatModelGPT3_5Turbo16k ChatModel = "gpt-3.5-turbo-16k"`
927
928 - `const ChatModelGPT3_5Turbo0301 ChatModel = "gpt-3.5-turbo-0301"`
929
930 - `const ChatModelGPT3_5Turbo0613 ChatModel = "gpt-3.5-turbo-0613"`
931
932 - `const ChatModelGPT3_5Turbo1106 ChatModel = "gpt-3.5-turbo-1106"`
933
934 - `const ChatModelGPT3_5Turbo0125 ChatModel = "gpt-3.5-turbo-0125"`
935
936 - `const ChatModelGPT3_5Turbo16k0613 ChatModel = "gpt-3.5-turbo-16k-0613"`
937
938 - `type ResponsesModel string`
939
940 - `const ResponsesModelO1Pro ResponsesModel = "o1-pro"`
941
942 - `const ResponsesModelO1Pro2025_03_19 ResponsesModel = "o1-pro-2025-03-19"`
943
944 - `const ResponsesModelO3Pro ResponsesModel = "o3-pro"`
945
946 - `const ResponsesModelO3Pro2025_06_10 ResponsesModel = "o3-pro-2025-06-10"`
947
948 - `const ResponsesModelO3DeepResearch ResponsesModel = "o3-deep-research"`
949
950 - `const ResponsesModelO3DeepResearch2025_06_26 ResponsesModel = "o3-deep-research-2025-06-26"`
951
952 - `const ResponsesModelO4MiniDeepResearch ResponsesModel = "o4-mini-deep-research"`
953
954 - `const ResponsesModelO4MiniDeepResearch2025_06_26 ResponsesModel = "o4-mini-deep-research-2025-06-26"`
955
956 - `const ResponsesModelComputerUsePreview ResponsesModel = "computer-use-preview"`
957
958 - `const ResponsesModelComputerUsePreview2025_03_11 ResponsesModel = "computer-use-preview-2025-03-11"`
959
960 - `const ResponsesModelGPT5Codex ResponsesModel = "gpt-5-codex"`
961
962 - `const ResponsesModelGPT5Pro ResponsesModel = "gpt-5-pro"`
963
964 - `const ResponsesModelGPT5Pro2025_10_06 ResponsesModel = "gpt-5-pro-2025-10-06"`
965
966 - `const ResponsesModelGPT5_1CodexMax ResponsesModel = "gpt-5.1-codex-max"`