ibm_watson 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a856f95170a6ba51cbb7ea7dc4e04e9e5f99ed57d292c642b566e1c9017c3e9e
4
- data.tar.gz: e81652472da29d3032abef05ebd539b639f73be51f0e91455d19bea389c29105
3
+ metadata.gz: 4855d1f0d0409f6fcf35241392746eeebf914f291324de8800aa887f9e8ee96c
4
+ data.tar.gz: 70ca55c6305cd18b96830799be213fdd2aa33d35252cf7016cb4582e6eafe29c
5
5
  SHA512:
6
- metadata.gz: b63bfa564a2e2ddefd1de282f0e0d228211fcfcd8f662136c8fe77a870f39e28b6e88772460aa9b43a652e523c16f116449de79c340bb72d94e3a9f962b95992
7
- data.tar.gz: 7d5ec257697c47db06505a8948ed27e434eab18bb56171d298d9569a3c1cd7cae2711a7a19cb63d78d97ba32fa54a8d1da60db8716e5e3c04b3e2ad2a3517235
6
+ metadata.gz: 4465338e55529801fb063053aac73c41270d83e258a6bd9f0005f4bdaa511786cfdea38e1b5419d4f276382980f7f1aeb4be376f6ca099266e5d1cf46086f10f
7
+ data.tar.gz: 38beeb9ca5a85c78d0419cbae8868d0cfb2f4200ea3e7ee34f897e86b314049977e790d0302d5ebba268bb869ba2f83bdd586f97ad0cf76f1fbaf93308cd491a
@@ -921,7 +921,7 @@ module IBMWatson
921
921
  end
922
922
 
923
923
  ##
924
- # @!method add_custom_prompt(customization_id:, prompt_id:, metadata:, file:, filename: nil)
924
+ # @!method add_custom_prompt(customization_id:, prompt_id:, metadata:, file:)
925
925
  # Add a custom prompt.
926
926
  # Adds a custom prompt to a custom model. A prompt is defined by the text that is to
927
927
  # be spoken, the audio for that text, a unique user-specified ID for the prompt, and
@@ -1027,9 +1027,8 @@ module IBMWatson
1027
1027
  # 16 kHz. The service accepts audio with higher sampling rates. The service
1028
1028
  # transcodes all audio to 16 kHz before processing it.
1029
1029
  # * The length of the prompt audio is limited to 30 seconds.
1030
- # @param filename [String] The filename for file.
1031
1030
  # @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.
1032
- def add_custom_prompt(customization_id:, prompt_id:, metadata:, file:, filename: nil)
1031
+ def add_custom_prompt(customization_id:, prompt_id:, metadata:, file:)
1033
1032
  raise ArgumentError.new("customization_id must be provided") if customization_id.nil?
1034
1033
 
1035
1034
  raise ArgumentError.new("prompt_id must be provided") if prompt_id.nil?
@@ -1050,8 +1049,7 @@ module IBMWatson
1050
1049
  unless file.instance_of?(StringIO) || file.instance_of?(File)
1051
1050
  file = file.respond_to?(:to_json) ? StringIO.new(file.to_json) : StringIO.new(file)
1052
1051
  end
1053
- filename = file.path if filename.nil? && file.respond_to?(:path)
1054
- form_data[:file] = HTTP::FormData::File.new(file, content_type: "audio/wav", filename: filename)
1052
+ form_data[:file] = HTTP::FormData::File.new(file, content_type: "audio/wav", filename: file.respond_to?(:path) ? file.path : nil)
1055
1053
 
1056
1054
  method_url = "/v1/customizations/%s/prompts/%s" % [ERB::Util.url_encode(customization_id), ERB::Util.url_encode(prompt_id)]
1057
1055
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IBMWatson
4
- VERSION = "2.1.0"
4
+ VERSION = "2.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibm_watson
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Nussbaum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-27 00:00:00.000000000 Z
11
+ date: 2021-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby