Skip to content

Commit b373d2d

Browse files
author
luoliwang.work
committed
Merge branch 'main' of github.com:openai/openai-go into docs/fix-module-path-v3
2 parents b34aaf7 + 7f35136 commit b373d2d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1464
-439
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.2.0"
2+
".": "3.8.1"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 123
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-d64cf80d2ebddf175c5578f68226a3d5bbd3f7fd8d62ccac2205f3fc05a355ee.yml
3-
openapi_spec_hash: d51e0d60d0c536f210b597a211bc5af0
4-
config_hash: e7c42016df9c6bd7bd6ff15101b9bc9b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-eeba8addf3a5f412e5ce8d22031e60c61650cee3f5d9e587a2533f6818a249ea.yml
3+
openapi_spec_hash: 0a4d8ad2469823ce24a3fd94f23f1c2b
4+
config_hash: 0bb1941a78ece0b610a2fbba7d74a84c

CHANGELOG.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,92 @@
11
# Changelog
22

3+
## 3.8.1 (2025-11-04)
4+
5+
Full Changelog: [v3.8.0...v3.8.1](https://github.com/openai/openai-go/compare/v3.8.0...v3.8.1)
6+
7+
### Bug Fixes
8+
9+
* **api:** fix nullability of logprobs ([b5aeb99](https://github.com/openai/openai-go/commit/b5aeb999e5088db4f9d1232a202a568a4a283019))
10+
11+
## 3.8.0 (2025-11-03)
12+
13+
Full Changelog: [v3.7.0...v3.8.0](https://github.com/openai/openai-go/compare/v3.7.0...v3.8.0)
14+
15+
### Features
16+
17+
* **api:** Realtime API token_limits, Hybrid searching ranking options ([9495f4a](https://github.com/openai/openai-go/commit/9495f4aa72bd5784fe3291637349ae1b706d8f8c))
18+
19+
20+
### Chores
21+
22+
* **internal:** grammar fix (it's -> its) ([879772d](https://github.com/openai/openai-go/commit/879772dc881a3d4fecf1425afc94a4bc141e9fb8))
23+
24+
## 3.7.0 (2025-10-28)
25+
26+
Full Changelog: [v3.6.1...v3.7.0](https://github.com/openai/openai-go/compare/v3.6.1...v3.7.0)
27+
28+
### Features
29+
30+
* **api:** remove InputAudio from ResponseInputContent ([cf50c53](https://github.com/openai/openai-go/commit/cf50c53f779784e1ee73b7d815456afaa3e1c447))
31+
* **azure:** allow passing custom scopes ([#541](https://github.com/openai/openai-go/issues/541)) ([dffa08e](https://github.com/openai/openai-go/commit/dffa08ece6c860ae1f87a01a5b8c26f18ce7ab2b))
32+
33+
34+
### Bug Fixes
35+
36+
* **api:** docs updates ([94d54c1](https://github.com/openai/openai-go/commit/94d54c1e19d0d58875f56058042e06410b23ac49))
37+
38+
## 3.6.1 (2025-10-20)
39+
40+
Full Changelog: [v3.6.0...v3.6.1](https://github.com/openai/openai-go/compare/v3.6.0...v3.6.1)
41+
42+
### Bug Fixes
43+
44+
* **api:** fix discriminator propertyName for ResponseFormatJsonSchema ([57b0505](https://github.com/openai/openai-go/commit/57b0505361029563b5fd56fb6085b58e813936cc))
45+
46+
## 3.6.0 (2025-10-20)
47+
48+
Full Changelog: [v3.5.0...v3.6.0](https://github.com/openai/openai-go/compare/v3.5.0...v3.6.0)
49+
50+
### Features
51+
52+
* **api:** Add responses.input_tokens.count ([a43f2ce](https://github.com/openai/openai-go/commit/a43f2cef132d4cbd4a4a3dedf600f2da0a1ea2f5))
53+
54+
55+
### Bug Fixes
56+
57+
* **api:** internal openapi updates ([7ad9b02](https://github.com/openai/openai-go/commit/7ad9b02d1e86cb3235c779e4e0f6e2ee226662d3))
58+
59+
## 3.5.0 (2025-10-17)
60+
61+
Full Changelog: [v3.4.0...v3.5.0](https://github.com/openai/openai-go/compare/v3.4.0...v3.5.0)
62+
63+
### Features
64+
65+
* **api:** api update ([1aa78dd](https://github.com/openai/openai-go/commit/1aa78dda7aae7b72ce021250b5357ead8db36f46))
66+
67+
## 3.4.0 (2025-10-16)
68+
69+
Full Changelog: [v3.3.0...v3.4.0](https://github.com/openai/openai-go/compare/v3.3.0...v3.4.0)
70+
71+
### Features
72+
73+
* **api:** Add support for gpt-4o-transcribe-diarize on audio/transcriptions endpoint ([ee32400](https://github.com/openai/openai-go/commit/ee32400f70d6d16c583978c574806648bdeecd91))
74+
75+
76+
### Chores
77+
78+
* **api:** internal updates ([74c8031](https://github.com/openai/openai-go/commit/74c8031304013f5d7c24bd9db93d73da80efba9f))
79+
* **client:** undo more naming changes ([db441bc](https://github.com/openai/openai-go/commit/db441bcb7fb830743d9489589a3a48ca79d2f80a))
80+
* **client:** undo some naming changes ([a5aa3d6](https://github.com/openai/openai-go/commit/a5aa3d6e0d6773f838f826bbd68f96b70fef0653))
81+
82+
## 3.3.0 (2025-10-10)
83+
84+
Full Changelog: [v3.2.0...v3.3.0](https://github.com/openai/openai-go/compare/v3.2.0...v3.3.0)
85+
86+
### Features
87+
88+
* **api:** comparison filter in/not in ([d6daca0](https://github.com/openai/openai-go/commit/d6daca0eedd998f49d8bfde0c3caba74d762c0d6))
89+
390
## 3.2.0 (2025-10-06)
491

592
Full Changelog: [v3.1.0...v3.2.0](https://github.com/openai/openai-go/compare/v3.1.0...v3.2.0)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Or to pin the version:
3030
<!-- x-release-please-start-version -->
3131

3232
```sh
33-
go get -u 'github.com/openai/openai-go/v3@v3.2.0'
33+
go get -u 'github.com/openai/openai-go/v3@v3.8.1'
3434
```
3535

3636
<!-- x-release-please-end -->
@@ -354,7 +354,7 @@ custom := param.Override[openai.FooParams](12)
354354

355355
### Request unions
356356

357-
Unions are represented as a struct with fields prefixed by "Of" for each of it's variants,
357+
Unions are represented as a struct with fields prefixed by "Of" for each of its variants,
358358
only one field can be non-zero. The non-zero field will be serialized.
359359

360360
Sub-properties of the union can be accessed via methods on the union struct.

aliases.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,17 @@ const ChatModelGPT3_5Turbo16k0613 = shared.ChatModelGPT3_5Turbo16k0613
211211
// This is an alias to an internal type.
212212
type ComparisonFilter = shared.ComparisonFilter
213213

214-
// Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`.
214+
// Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`,
215+
// `nin`.
215216
//
216217
// - `eq`: equals
217218
// - `ne`: not equal
218219
// - `gt`: greater than
219220
// - `gte`: greater than or equal
220221
// - `lt`: less than
221222
// - `lte`: less than or equal
223+
// - `in`: in
224+
// - `nin`: not in
222225
//
223226
// This is an alias to an internal type.
224227
type ComparisonFilterType = shared.ComparisonFilterType
@@ -247,6 +250,9 @@ const ComparisonFilterTypeLte = shared.ComparisonFilterTypeLte
247250
// This is an alias to an internal type.
248251
type ComparisonFilterValueUnion = shared.ComparisonFilterValueUnion
249252

253+
// This is an alias to an internal type.
254+
type ComparisonFilterValueArrayItemUnion = shared.ComparisonFilterValueArrayItemUnion
255+
250256
// A filter used to compare a specified attribute key to a given value using a
251257
// defined comparison operation.
252258
//
@@ -259,6 +265,9 @@ type ComparisonFilterParam = shared.ComparisonFilterParam
259265
// This is an alias to an internal type.
260266
type ComparisonFilterValueUnionParam = shared.ComparisonFilterValueUnionParam
261267

268+
// This is an alias to an internal type.
269+
type ComparisonFilterValueArrayItemUnionParam = shared.ComparisonFilterValueArrayItemUnionParam
270+
262271
// Combine multiple filters using `and` or `or`.
263272
//
264273
// This is an alias to an internal type.
@@ -370,6 +379,8 @@ const ReasoningGenerateSummaryDetailed = shared.ReasoningGenerateSummaryDetailed
370379
// debugging and understanding the model's reasoning process. One of `auto`,
371380
// `concise`, or `detailed`.
372381
//
382+
// `concise` is only supported for `computer-use-preview` models.
383+
//
373384
// This is an alias to an internal type.
374385
type ReasoningSummary = shared.ReasoningSummary
375386

@@ -396,6 +407,9 @@ type ReasoningParam = shared.ReasoningParam
396407
// effort can result in faster responses and fewer tokens used on reasoning in a
397408
// response.
398409
//
410+
// Note: The `gpt-5-pro` model defaults to (and only supports) `high` reasoning
411+
// effort.
412+
//
399413
// This is an alias to an internal type.
400414
type ReasoningEffort = shared.ReasoningEffort
401415

api.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,18 @@ Params Types:
179179
Response Types:
180180

181181
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#Transcription">Transcription</a>
182+
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#TranscriptionSegment">TranscriptionSegment</a>
182183
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#TranscriptionStreamEventUnion">TranscriptionStreamEventUnion</a>
183184
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#TranscriptionTextDeltaEvent">TranscriptionTextDeltaEvent</a>
184185
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#TranscriptionTextDoneEvent">TranscriptionTextDoneEvent</a>
186+
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#TranscriptionTextSegmentEvent">TranscriptionTextSegmentEvent</a>
187+
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#TranscriptionVerbose">TranscriptionVerbose</a>
188+
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#TranscriptionWord">TranscriptionWord</a>
189+
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AudioTranscriptionNewResponseUnion">AudioTranscriptionNewResponseUnion</a>
185190

186191
Methods:
187192

188-
- <code title="post /audio/transcriptions">client.Audio.Transcriptions.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AudioTranscriptionService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AudioTranscriptionNewParams">AudioTranscriptionNewParams</a>) (Transcription, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
193+
- <code title="post /audio/transcriptions">client.Audio.Transcriptions.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AudioTranscriptionService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AudioTranscriptionNewParams">AudioTranscriptionNewParams</a>) (<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#AudioTranscriptionNewResponseUnion">AudioTranscriptionNewResponseUnion</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
189194

190195
## Translations
191196

@@ -436,13 +441,6 @@ Methods:
436441
Response Types:
437442

438443
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#ChatKitWorkflow">ChatKitWorkflow</a>
439-
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#FilePart">FilePart</a>
440-
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#ImagePart">ImagePart</a>
441-
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#BetaChatKitUploadFileResponseUnion">BetaChatKitUploadFileResponseUnion</a>
442-
443-
Methods:
444-
445-
- <code title="post /chatkit/files">client.Beta.ChatKit.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#BetaChatKitService.UploadFile">UploadFile</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#BetaChatKitUploadFileParams">BetaChatKitUploadFileParams</a>) (<a href="https://pkg.go.dev/github.com/openai/openai-go/v3">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3#BetaChatKitUploadFileResponseUnion">BetaChatKitUploadFileResponseUnion</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
446444

447445
### Sessions
448446

@@ -848,6 +846,16 @@ Methods:
848846

849847
- <code title="get /responses/{response_id}/input_items">client.Responses.InputItems.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses#InputItemService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, responseID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses">responses</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses#InputItemListParams">InputItemListParams</a>) (<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/packages/pagination#CursorPage">CursorPage</a>[<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses">responses</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses#ResponseItemUnion">ResponseItemUnion</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
850848

849+
## InputTokens
850+
851+
Response Types:
852+
853+
- <a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses">responses</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses#InputTokenCountResponse">InputTokenCountResponse</a>
854+
855+
Methods:
856+
857+
- <code title="post /responses/input_tokens">client.Responses.InputTokens.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses#InputTokenService.Count">Count</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, body <a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses">responses</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses#InputTokenCountParams">InputTokenCountParams</a>) (<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses">responses</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go/v3/responses#InputTokenCountResponse">InputTokenCountResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
858+
851859
# Realtime
852860

853861
Params Types:

audio.go

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,24 @@ func NewAudioService(opts ...option.RequestOption) (r AudioService) {
3434
type AudioModel = string
3535

3636
const (
37-
AudioModelWhisper1 AudioModel = "whisper-1"
38-
AudioModelGPT4oTranscribe AudioModel = "gpt-4o-transcribe"
39-
AudioModelGPT4oMiniTranscribe AudioModel = "gpt-4o-mini-transcribe"
37+
AudioModelWhisper1 AudioModel = "whisper-1"
38+
AudioModelGPT4oTranscribe AudioModel = "gpt-4o-transcribe"
39+
AudioModelGPT4oMiniTranscribe AudioModel = "gpt-4o-mini-transcribe"
40+
AudioModelGPT4oTranscribeDiarize AudioModel = "gpt-4o-transcribe-diarize"
4041
)
4142

4243
// The format of the output, in one of these options: `json`, `text`, `srt`,
43-
// `verbose_json`, or `vtt`. For `gpt-4o-transcribe` and `gpt-4o-mini-transcribe`,
44-
// the only supported format is `json`.
44+
// `verbose_json`, `vtt`, or `diarized_json`. For `gpt-4o-transcribe` and
45+
// `gpt-4o-mini-transcribe`, the only supported format is `json`. For
46+
// `gpt-4o-transcribe-diarize`, the supported formats are `json`, `text`, and
47+
// `diarized_json`, with `diarized_json` required to receive speaker annotations.
4548
type AudioResponseFormat string
4649

4750
const (
48-
AudioResponseFormatJSON AudioResponseFormat = "json"
49-
AudioResponseFormatText AudioResponseFormat = "text"
50-
AudioResponseFormatSRT AudioResponseFormat = "srt"
51-
AudioResponseFormatVerboseJSON AudioResponseFormat = "verbose_json"
52-
AudioResponseFormatVTT AudioResponseFormat = "vtt"
51+
AudioResponseFormatJSON AudioResponseFormat = "json"
52+
AudioResponseFormatText AudioResponseFormat = "text"
53+
AudioResponseFormatSRT AudioResponseFormat = "srt"
54+
AudioResponseFormatVerboseJSON AudioResponseFormat = "verbose_json"
55+
AudioResponseFormatVTT AudioResponseFormat = "vtt"
56+
AudioResponseFormatDiarizedJSON AudioResponseFormat = "diarized_json"
5357
)

0 commit comments

Comments
 (0)