Skip to content

Commit 2914af7

Browse files
chore(internal): codegen related update
1 parent b13dc28 commit 2914af7

6 files changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,18 @@ jobs:
3333
bundle install
3434
3535
- name: Get GitHub OIDC Token
36-
if: github.repository == 'stainless-sdks/openai-ruby'
36+
if: |-
37+
github.repository == 'stainless-sdks/openai-ruby' &&
38+
!startsWith(github.ref, 'refs/heads/stl/')
3739
id: github-oidc
3840
uses: actions/github-script@v8
3941
with:
4042
script: core.setOutput('github_token', await core.getIDToken());
4143

4244
- name: Build and upload gem artifacts
43-
if: github.repository == 'stainless-sdks/openai-ruby'
45+
if: |-
46+
github.repository == 'stainless-sdks/openai-ruby' &&
47+
!startsWith(github.ref, 'refs/heads/stl/')
4448
env:
4549
URL: https://pkg.stainless.com/s
4650
AUTH: ${{ steps.github-oidc.outputs.github_token }}

test/openai/resources/audio/transcriptions_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
class OpenAI::Test::Resources::Audio::TranscriptionsTest < OpenAI::Test::ResourceTest
66
def test_create_required_params
7-
response = @openai.audio.transcriptions.create(file: Pathname(__FILE__), model: :"gpt-4o-transcribe")
7+
response =
8+
@openai.audio.transcriptions.create(file: StringIO.new("Example data"), model: :"gpt-4o-transcribe")
89

910
assert_pattern do
1011
response => OpenAI::Models::Audio::TranscriptionCreateResponse

test/openai/resources/audio/translations_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class OpenAI::Test::Resources::Audio::TranslationsTest < OpenAI::Test::ResourceTest
66
def test_create_required_params
7-
response = @openai.audio.translations.create(file: Pathname(__FILE__), model: :"whisper-1")
7+
response = @openai.audio.translations.create(file: StringIO.new("Example data"), model: :"whisper-1")
88

99
assert_pattern do
1010
response => OpenAI::Models::Audio::TranslationCreateResponse

test/openai/resources/files_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class OpenAI::Test::Resources::FilesTest < OpenAI::Test::ResourceTest
66
def test_create_required_params
7-
response = @openai.files.create(file: Pathname(__FILE__), purpose: :assistants)
7+
response = @openai.files.create(file: StringIO.new("Example data"), purpose: :assistants)
88

99
assert_pattern do
1010
response => OpenAI::FileObject

test/openai/resources/images_test.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class OpenAI::Test::Resources::ImagesTest < OpenAI::Test::ResourceTest
66
def test_create_variation_required_params
7-
response = @openai.images.create_variation(image: Pathname(__FILE__))
7+
response = @openai.images.create_variation(image: StringIO.new("Example data"))
88

99
assert_pattern do
1010
response => OpenAI::ImagesResponse
@@ -25,7 +25,10 @@ def test_create_variation_required_params
2525

2626
def test_edit_required_params
2727
response =
28-
@openai.images.edit(image: Pathname(__FILE__), prompt: "A cute baby sea otter wearing a beret")
28+
@openai.images.edit(
29+
image: StringIO.new("Example data"),
30+
prompt: "A cute baby sea otter wearing a beret"
31+
)
2932

3033
assert_pattern do
3134
response => OpenAI::ImagesResponse

test/openai/resources/uploads/parts_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class OpenAI::Test::Resources::Uploads::PartsTest < OpenAI::Test::ResourceTest
66
def test_create_required_params
7-
response = @openai.uploads.parts.create("upload_abc123", data: Pathname(__FILE__))
7+
response = @openai.uploads.parts.create("upload_abc123", data: StringIO.new("Example data"))
88

99
assert_pattern do
1010
response => OpenAI::Uploads::UploadPart

0 commit comments

Comments
 (0)