Skip to content
Merged

8.2.0 #612

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [8.2.0] - 2025-08-10

### Added

- Add Security.md and activate private vulnerability reporting
- Add RealTime endpoint to create WebRTC token - thank you to [@ngelx](https://github.com/ngelx) for the PR and others for input!
- Add multi-image upload - thank you to [@ryankon](https://github.com/ryankon) and others for requesting.
- 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)!
- Handle OpenAI::Files request parameters - thank you to [@okorepanov](https://github.com/okorepanov) for the PR.
- Add Gemini docs - thanks to [@francis](https://github.com/francis).
- Add web proxy debugging docs - thanks to [@cpb](https://github.com/cpb).
- Add Rails / ActiveStorage transcription docs - thanks to [@AndreyAzimov](https://github.com/AndreyAzimov).

## [8.1.0] - 2025-03-30

### Added
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
ruby-openai (8.1.0)
ruby-openai (8.2.0)
event_stream_parser (>= 0.3.0, < 2.0.0)
faraday (>= 1)
faraday-multipart (>= 1)
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

**Sponsors**

Expand Down Expand Up @@ -540,11 +540,14 @@ You can stream it as well!

```ruby
response = client.responses.create(parameters: {
model: "gpt-4o",
input: "Hello! I'm Szymon!"
model: "gpt-5",
input: "Hello! I'm Szymon!",
reasoning: {
"effort": "minimal"
}
})
puts response.dig("output", 0, "content", 0, "text")
# => Hello Szymon! How can I assist you today?
# => Hi Szymon! Great to meet you. How can I help today?
```

#### Follow-up Messages
Expand Down Expand Up @@ -682,8 +685,7 @@ response =
message = response.dig("choices", 0, "message")

if message["role"] == "assistant" && message["tool_calls"]

# For a subsequent message with the role "tool", OpenAI requires the preceding message to have a tool_calls argument.
# For a subsequent message with the role "tool", OpenAI requires the preceding message to have a single tool_calls argument.
messages << message

message["tool_calls"].each do |tool_call|
Expand Down Expand Up @@ -1681,7 +1683,7 @@ user.media.blob.open do |file|
response = client.audio.transcribe(
parameters: {
model: "whisper-1",
file: File.open(temp_file, "rb"),
file: File.open(file, "rb"),
language: "en" # Optional
})
puts response["text"]
Expand Down
1 change: 1 addition & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Security Policy

Thank you for helping us keep ruby-openai and any systems it interacts with secure.

## Reporting Security Issues
Expand Down
2 changes: 1 addition & 1 deletion lib/openai/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module OpenAI
VERSION = "8.1.0".freeze
VERSION = "8.2.0".freeze
end

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading