Skip to content

Commit 462ff28

Browse files
authored
Merge pull request #612 from alexrudall/8.2.0
8.2.0
2 parents c2be20b + be50b7f commit 462ff28

File tree

11 files changed

+376
-44
lines changed

11 files changed

+376
-44
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [8.2.0] - 2025-08-10
9+
10+
### Added
11+
12+
- Add Security.md and activate private vulnerability reporting
13+
- Add RealTime endpoint to create WebRTC token - thank you to [@ngelx](https://github.com/ngelx) for the PR and others for input!
14+
- Add multi-image upload - thank you to [@ryankon](https://github.com/ryankon) and others for requesting.
15+
- Refactor streaming so that Chat, Responses, Assistant Runs and any others where events are streamed now send the event to the Proc, replacing unused _bytesize. Search the README for `_event` to see how to use this. Important change implemented by [@ingemar](https://github.com/ingemar)!
16+
- Handle OpenAI::Files request parameters - thank you to [@okorepanov](https://github.com/okorepanov) for the PR.
17+
- Add Gemini docs - thanks to [@francis](https://github.com/francis).
18+
- Add web proxy debugging docs - thanks to [@cpb](https://github.com/cpb).
19+
- Add Rails / ActiveStorage transcription docs - thanks to [@AndreyAzimov](https://github.com/AndreyAzimov).
20+
821
## [8.1.0] - 2025-03-30
922

1023
### Added

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
ruby-openai (8.1.0)
4+
ruby-openai (8.2.0)
55
event_stream_parser (>= 0.3.0, < 2.0.0)
66
faraday (>= 1)
77
faraday-multipart (>= 1)

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Use the [OpenAI API](https://openai.com/blog/openai-api/) with Ruby! 🤖❤️
88

9-
Stream chats with the Responses API, transcribe and translate audio with Whisper, create images with DALL·E, and much more...
9+
Stream GPT-5 chats with the Responses API, initiate Realtime WebRTC conversations, and much more...
1010

1111
**Sponsors**
1212

@@ -540,11 +540,14 @@ You can stream it as well!
540540

541541
```ruby
542542
response = client.responses.create(parameters: {
543-
model: "gpt-4o",
544-
input: "Hello! I'm Szymon!"
543+
model: "gpt-5",
544+
input: "Hello! I'm Szymon!",
545+
reasoning: {
546+
"effort": "minimal"
547+
}
545548
})
546549
puts response.dig("output", 0, "content", 0, "text")
547-
# => Hello Szymon! How can I assist you today?
550+
# => Hi Szymon! Great to meet you. How can I help today?
548551
```
549552

550553
#### Follow-up Messages
@@ -682,8 +685,7 @@ response =
682685
message = response.dig("choices", 0, "message")
683686

684687
if message["role"] == "assistant" && message["tool_calls"]
685-
686-
# For a subsequent message with the role "tool", OpenAI requires the preceding message to have a tool_calls argument.
688+
# For a subsequent message with the role "tool", OpenAI requires the preceding message to have a single tool_calls argument.
687689
messages << message
688690

689691
message["tool_calls"].each do |tool_call|
@@ -1681,7 +1683,7 @@ user.media.blob.open do |file|
16811683
response = client.audio.transcribe(
16821684
parameters: {
16831685
model: "whisper-1",
1684-
file: File.open(temp_file, "rb"),
1686+
file: File.open(file, "rb"),
16851687
language: "en" # Optional
16861688
})
16871689
puts response["text"]

SECURITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Security Policy
2+
23
Thank you for helping us keep ruby-openai and any systems it interacts with secure.
34

45
## Reporting Security Issues

lib/openai/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module OpenAI
2-
VERSION = "8.1.0".freeze
2+
VERSION = "8.2.0".freeze
33
end

spec/fixtures/cassettes/gpt-3_5-turbo_multiple_tool_calls_full_conversation.yml

Lines changed: 257 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)