openai 0.26.0 → 0.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3c1a71d808c79d0cc0c3d6258103489ca127f3c437d79823b8975e73a5c5027
4
- data.tar.gz: a5cd6cc4d1cb2d7f144b9d7f498d9ae51d540bb025883b0c04f9ac60c751487e
3
+ metadata.gz: 771318c0267e149df16523a1341d80a925d09a4d020fc12602e7da3c91e57ca0
4
+ data.tar.gz: cb371db328139f92e1c2ae38b8ef9a533a2d38f04947156ec5d8415cb753d301
5
5
  SHA512:
6
- metadata.gz: f923479ccd9602e086b3dd87cb4b17f94cc42146f9e61b313473161f824cba737b4770c776bac4158e658896d8f77a2c1fcff571c99e97a544da89c8f6fbceb7
7
- data.tar.gz: 5113901c49d3bb0476d7076ff41270e1baa68a02b54db309312589214d372607352936b310a6d8ce6b4ccdb02d72054043c79b1b3c38e560f19e065b091c2867
6
+ metadata.gz: 12a9667f62fbe9fc9d4ba150490ff2484a82f283c3dfb4ef82fdbf64d70ba507509ac6c593b6597e93255c576f1f123c8b5e5bfacfbc2954c4bb305a6bc087db
7
+ data.tar.gz: 248f09914e2785bcbc96cc6ff3a7fbd52a19da1e6c8418c0434ccfc5ed756be88fe8c20056fe222b4030f5487b17da5a631f876c66d8a7bccb957499165e98c5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.27.1 (2025-09-29)
4
+
5
+ Full Changelog: [v0.27.0...v0.27.1](https://github.com/openai/openai-ruby/compare/v0.27.0...v0.27.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * always send `filename=...` for multipart requests where a file is expected ([99849fd](https://github.com/openai/openai-ruby/commit/99849fddf478869b57b77cbe208efd13d9a8246e))
10
+
11
+ ## 0.27.0 (2025-09-26)
12
+
13
+ Full Changelog: [v0.26.0...v0.27.0](https://github.com/openai/openai-ruby/compare/v0.26.0...v0.27.0)
14
+
15
+ ### Features
16
+
17
+ * chat completion streaming helpers ([#828](https://github.com/openai/openai-ruby/issues/828)) ([6e98424](https://github.com/openai/openai-ruby/commit/6e9842485e819876dd6b78107fa45f1a5da67e4f))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **internal:** use null byte as file separator in the fast formatting script ([151ffe1](https://github.com/openai/openai-ruby/commit/151ffe10c9dc8d5edaf46de2a1c6b6e6fda80034))
23
+ * shorten multipart boundary sep to less than RFC specificed max length ([d7770d1](https://github.com/openai/openai-ruby/commit/d7770d10ee3b093d8e2464b79e0e12be3a9d2beb))
24
+
25
+
26
+ ### Performance Improvements
27
+
28
+ * faster code formatting ([67da711](https://github.com/openai/openai-ruby/commit/67da71139e5b572c97539299c39bae04c1d569fd))
29
+
30
+
31
+ ### Chores
32
+
33
+ * allow fast-format to use bsd sed as well ([66ac913](https://github.com/openai/openai-ruby/commit/66ac913d195d8b5a5c4474ded88a5f9dad13b7b6))
34
+
3
35
  ## 0.26.0 (2025-09-23)
4
36
 
5
37
  Full Changelog: [v0.25.1...v0.26.0](https://github.com/openai/openai-ruby/compare/v0.25.1...v0.26.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "openai", "~> 0.26.0"
18
+ gem "openai", "~> 0.27.1"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -38,18 +38,21 @@ module OpenAI
38
38
  def to_yaml(*a) = read.to_yaml(*a)
39
39
 
40
40
  # @param content [Pathname, StringIO, IO, String]
41
- # @param filename [String, nil]
41
+ # @param filename [Pathname, String, nil]
42
42
  # @param content_type [String, nil]
43
43
  def initialize(content, filename: nil, content_type: nil)
44
- @content = content
44
+ @content_type = content_type
45
45
  @filename =
46
- case content
47
- in Pathname
48
- filename.nil? ? content.basename.to_path : ::File.basename(filename)
46
+ case [filename, (@content = content)]
47
+ in [String | Pathname, _]
48
+ ::File.basename(filename)
49
+ in [nil, Pathname]
50
+ content.basename.to_path
51
+ in [nil, IO]
52
+ content.to_path
49
53
  else
50
- filename.nil? ? nil : ::File.basename(filename)
54
+ filename
51
55
  end
52
- @content_type = content_type
53
56
  end
54
57
  end
55
58
  end