runapi-openai-tts 0.1.3 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74842654b933f063885e17d6c0a9689a2c056a7a62bbf66304e162bca127be35
4
- data.tar.gz: 99e3fa3582d9f44e2dca74de964fdb2bedd28fd29500b9bbadef4fe9ea7b2db2
3
+ metadata.gz: e4241d122c93898d46120d9c4789ab2ef30a260ff1080b090962570bdfc8b01f
4
+ data.tar.gz: 4ffd5a2007cc827a2ee05641b2e06c49213a3fc6208559ab5d8dbd0495bd6f2f
5
5
  SHA512:
6
- metadata.gz: 30ab91adb95467ac991e256df59439cc77b4c9b8293ef905df1d0871db285bed9ca227a992153cb6a606a593a64dd677d84f09e5ac95115e18885b04542bd745
7
- data.tar.gz: 0d641768cccfa3196e6dcc10c09cb45e68f7f9c92589d6926c95172606d4f45314f932adb1712eb1c24f62135149dc5915d3fb71a284439bde8614dd2795e55b
6
+ metadata.gz: 5d2c8c4f7bbf0955a41af99d487c54a891a8f0e936ed3df62350dc15c8ff1c61d4881c018c193a4698874a0577351251563df1a39fba4b88fd2d4190c50c3d95
7
+ data.tar.gz: ef173acb3066b69854d320ee49d07f1eb43a14803ef6d17c504f61378c0344852e6838f4f3a652dd93ded5ab252b0a3e9b4be643d1fe22186185a333ed4dea4c
@@ -16,8 +16,12 @@ module RunApi
16
16
 
17
17
  def run(options: nil, **params)
18
18
  params = compact_params(params)
19
- validate_contract!(CONTRACT["text-to-speech"], params)
20
- request(:post, ENDPOINT, body: params, options: options)
19
+ run_hybrid(ENDPOINT, body: params, options: options, response_class: RESPONSE_CLASS)
20
+ end
21
+
22
+ def subscribe(options: nil, **params)
23
+ params = compact_params(params)
24
+ subscribe_hybrid(ENDPOINT, body: params, options: options, response_class: RESPONSE_CLASS)
21
25
  end
22
26
  end
23
27
  end
@@ -2,7 +2,6 @@
2
2
 
3
3
  require "runapi/core"
4
4
  require_relative "openai_tts/types"
5
- require_relative "openai_tts/contract_gen"
6
5
  require_relative "openai_tts/resources/text_to_speech"
7
6
  require_relative "openai_tts/client"
8
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runapi-openai-tts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - RunAPI
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.4.0
18
+ version: 0.6.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 0.4.0
25
+ version: 0.6.0
26
26
  description: 'Install `runapi-openai-tts`, create `RunApi::OpenaiTts::Client`, and
27
27
  call `client.text_to_speech.run(model: "tts-1", text: "Hello")`.'
28
28
  email:
@@ -37,7 +37,6 @@ files:
37
37
  - lib/runapi-openai_tts.rb
38
38
  - lib/runapi/openai_tts.rb
39
39
  - lib/runapi/openai_tts/client.rb
40
- - lib/runapi/openai_tts/contract_gen.rb
41
40
  - lib/runapi/openai_tts/resources/text_to_speech.rb
42
41
  - lib/runapi/openai_tts/types.rb
43
42
  homepage: https://runapi.ai/models/openai-tts
@@ -64,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
63
  - !ruby/object:Gem::Version
65
64
  version: '0'
66
65
  requirements: []
67
- rubygems_version: 4.0.10
66
+ rubygems_version: 3.6.9
68
67
  specification_version: 4
69
68
  summary: OpenAI TTS Ruby SDK for RunAPI
70
69
  test_files: []
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RunApi
4
- module OpenaiTts
5
- CONTRACT = {
6
- "text-to-speech" => {
7
- "models" => ["tts-1", "tts-1-hd"],
8
- "fields_by_model" => {
9
- "tts-1" => {
10
- "model" => {
11
- "required" => true
12
- },
13
- "text" => {
14
- "required" => true,
15
- "max" => 4096,
16
- "length" => true
17
- }
18
- },
19
- "tts-1-hd" => {
20
- "model" => {
21
- "required" => true
22
- },
23
- "text" => {
24
- "required" => true,
25
- "max" => 4096,
26
- "length" => true
27
- }
28
- }
29
- }
30
- }
31
- }.freeze
32
- end
33
- end