Skip to content

Commit ce9f435

Browse files
chore(internal): codegen related update
1 parent b9d280a commit ce9f435

File tree

10 files changed

+17
-13
lines changed

10 files changed

+17
-13
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,18 @@ jobs:
2727
- uses: actions/checkout@v6
2828

2929
- name: Get GitHub OIDC Token
30-
if: github.repository == 'stainless-sdks/openai-go'
30+
if: |-
31+
github.repository == 'stainless-sdks/openai-go' &&
32+
!startsWith(github.ref, 'refs/heads/stl/')
3133
id: github-oidc
3234
uses: actions/github-script@v8
3335
with:
3436
script: core.setOutput('github_token', await core.getIDToken());
3537

3638
- name: Upload tarball
37-
if: github.repository == 'stainless-sdks/openai-go'
39+
if: |-
40+
github.repository == 'stainless-sdks/openai-go' &&
41+
!startsWith(github.ref, 'refs/heads/stl/')
3842
env:
3943
URL: https://pkg.stainless.com/s
4044
AUTH: ${{ steps.github-oidc.outputs.github_token }}

audiotranscription_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestAudioTranscriptionNewWithOptionalParams(t *testing.T) {
2929
option.WithAPIKey("My API Key"),
3030
)
3131
_, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{
32-
File: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
32+
File: io.Reader(bytes.NewBuffer([]byte("Example data"))),
3333
Model: openai.AudioModelGPT4oTranscribe,
3434
ChunkingStrategy: openai.AudioTranscriptionNewParamsChunkingStrategyUnion{
3535
OfAuto: constant.ValueOf[constant.Auto](),

audiotranslation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestAudioTranslationNewWithOptionalParams(t *testing.T) {
2828
option.WithAPIKey("My API Key"),
2929
)
3030
_, err := client.Audio.Translations.New(context.TODO(), openai.AudioTranslationNewParams{
31-
File: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
31+
File: io.Reader(bytes.NewBuffer([]byte("Example data"))),
3232
Model: openai.AudioModelWhisper1,
3333
Prompt: openai.String("prompt"),
3434
ResponseFormat: openai.AudioTranslationNewParamsResponseFormatJSON,

containerfile_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestContainerFileNewWithOptionalParams(t *testing.T) {
3131
context.TODO(),
3232
"container_id",
3333
openai.ContainerFileNewParams{
34-
File: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
34+
File: io.Reader(bytes.NewBuffer([]byte("Example data"))),
3535
FileID: openai.String("file_id"),
3636
},
3737
)

file_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestFileNewWithOptionalParams(t *testing.T) {
3030
option.WithAPIKey("My API Key"),
3131
)
3232
_, err := client.Files.New(context.TODO(), openai.FileNewParams{
33-
File: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
33+
File: io.Reader(bytes.NewBuffer([]byte("Example data"))),
3434
Purpose: openai.FilePurposeAssistants,
3535
ExpiresAfter: openai.FileNewParamsExpiresAfter{
3636
Seconds: 3600,

image_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestImageNewVariationWithOptionalParams(t *testing.T) {
2828
option.WithAPIKey("My API Key"),
2929
)
3030
_, err := client.Images.NewVariation(context.TODO(), openai.ImageNewVariationParams{
31-
Image: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
31+
Image: io.Reader(bytes.NewBuffer([]byte("Example data"))),
3232
Model: openai.ImageModelGPTImage1_5,
3333
N: openai.Int(1),
3434
ResponseFormat: openai.ImageNewVariationParamsResponseFormatURL,
@@ -58,12 +58,12 @@ func TestImageEditWithOptionalParams(t *testing.T) {
5858
)
5959
_, err := client.Images.Edit(context.TODO(), openai.ImageEditParams{
6060
Image: openai.ImageEditParamsImageUnion{
61-
OfFile: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
61+
OfFile: io.Reader(bytes.NewBuffer([]byte("Example data"))),
6262
},
6363
Prompt: "A cute baby sea otter wearing a beret",
6464
Background: openai.ImageEditParamsBackgroundTransparent,
6565
InputFidelity: openai.ImageEditParamsInputFidelityHigh,
66-
Mask: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
66+
Mask: io.Reader(bytes.NewBuffer([]byte("Example data"))),
6767
Model: openai.ImageModelGPTImage1_5,
6868
N: openai.Int(1),
6969
OutputCompression: openai.Int(100),

skill_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestSkillNewWithOptionalParams(t *testing.T) {
2929
)
3030
_, err := client.Skills.New(context.TODO(), openai.SkillNewParams{
3131
Files: openai.SkillNewParamsFilesUnion{
32-
OfFileArray: []io.Reader{io.Reader(bytes.NewBuffer([]byte("some file contents")))},
32+
OfFileArray: []io.Reader{io.Reader(bytes.NewBuffer([]byte("Example data")))},
3333
},
3434
})
3535
if err != nil {

skillversion_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func TestSkillVersionNewWithOptionalParams(t *testing.T) {
3333
openai.SkillVersionNewParams{
3434
Default: openai.Bool(true),
3535
Files: openai.SkillVersionNewParamsFilesUnion{
36-
OfFileArray: []io.Reader{io.Reader(bytes.NewBuffer([]byte("some file contents")))},
36+
OfFileArray: []io.Reader{io.Reader(bytes.NewBuffer([]byte("Example data")))},
3737
},
3838
},
3939
)

uploadpart_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestUploadPartNew(t *testing.T) {
3131
context.TODO(),
3232
"upload_abc123",
3333
openai.UploadPartNewParams{
34-
Data: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
34+
Data: io.Reader(bytes.NewBuffer([]byte("Example data"))),
3535
},
3636
)
3737
if err != nil {

video_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestVideoNewWithOptionalParams(t *testing.T) {
3131
)
3232
_, err := client.Videos.New(context.TODO(), openai.VideoNewParams{
3333
Prompt: "x",
34-
InputReference: io.Reader(bytes.NewBuffer([]byte("some file contents"))),
34+
InputReference: io.Reader(bytes.NewBuffer([]byte("Example data"))),
3535
Model: openai.VideoModelSora2,
3636
Seconds: openai.VideoSeconds4,
3737
Size: openai.VideoSize720x1280,

0 commit comments

Comments
 (0)