ruby-openai 6.1.0 → 6.2.0
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +16 -0
- data/lib/openai/audio.rb +4 -0
- data/lib/openai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b77870afd356728570560cf1e2c7c703210f51db327c6d7e4c2d028d1979c12
|
4
|
+
data.tar.gz: f0b79c7776c0ff022f22f889923d3024f8a1d1894f47771105c9508c460739f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99f138cc6d2e4593191ca5833e4b81e9cc4b8a9b039010e0f43eb24c999ae413b530e4cd017b9c6a325264c7e8771a293b43c6e35daef50dd49f7568f6b11197
|
7
|
+
data.tar.gz: 2fdfbc69cdb6ee7b16693421704e7f9dda8bd0d1cc4da2c14ec2fdf6f3c8e380b3643462c799c69affddfc7a9f3e66983bb58d9965ee01e187245def25d99eb4
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [6.2.0] - 2023-11-15
|
9
|
+
|
10
|
+
### Added
|
11
|
+
|
12
|
+
- Add text-to-speech! Thank you [@codergeek121](https://github.com/codergeek121)
|
13
|
+
|
8
14
|
## [6.1.0] - 2023-11-14
|
9
15
|
|
10
16
|
### Added
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -460,6 +460,22 @@ puts response["text"]
|
|
460
460
|
# => "Transcription of the text"
|
461
461
|
```
|
462
462
|
|
463
|
+
#### Speech
|
464
|
+
|
465
|
+
The speech API takes as input the text and a voice and returns the content of an audio file you can listen to.
|
466
|
+
|
467
|
+
```ruby
|
468
|
+
response = client.audio.speech(
|
469
|
+
parameters: {
|
470
|
+
model: "tts-1",
|
471
|
+
input: "This is a speech test!",
|
472
|
+
voice: "alloy"
|
473
|
+
}
|
474
|
+
)
|
475
|
+
File.binwrite('demo.mp3', response)
|
476
|
+
# => mp3 file that plays: "This is a speech test!"
|
477
|
+
```
|
478
|
+
|
463
479
|
### Errors
|
464
480
|
|
465
481
|
HTTP errors can be caught like this:
|
data/lib/openai/audio.rb
CHANGED
data/lib/openai/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-openai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: event_stream_parser
|