assemblyai 1.0.0.pre.beta.10 → 1.0.0.pre.beta.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assemblyai/lemur/client.rb +49 -0
- data/lib/assemblyai/lemur/types/lemur_action_items_response.rb +16 -2
- data/lib/assemblyai/lemur/types/lemur_base_response.rb +20 -3
- data/lib/assemblyai/lemur/types/lemur_question_answer_response.rb +15 -2
- data/lib/assemblyai/lemur/types/lemur_response.rb +86 -0
- data/lib/assemblyai/lemur/types/lemur_summary_response.rb +16 -2
- data/lib/assemblyai/lemur/types/lemur_task_response.rb +16 -2
- data/lib/assemblyai/lemur/types/lemur_usage.rb +67 -0
- data/lib/assemblyai/transcripts/polling_client.rb +20 -8
- data/lib/assemblyai.rb +8 -6
- data/lib/gemconfig.rb +5 -4
- data/lib/requests.rb +12 -7
- data/lib/types_export.rb +3 -1
- data/lib/user_agent.rb +69 -0
- metadata +10 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9034fb96ca90c8408fbfd7fc97683c4d9a3ece611dd24c48cf1c4359fdb34f60
|
4
|
+
data.tar.gz: dcac6189a3a041f59a0b3eb67f4c27fa9bae181d3823fd514e3dbbd52ff69d71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c949d40ee00af765612f85dd2291050d67b86171d8861927c7f70bc32bcfa06dd7af93e3877ac8d3ed3b2432b9c11c5e9394cc60aa1e34341ec05ad786c8939
|
7
|
+
data.tar.gz: 2b2f829a93d8d6c86c8d39c19190f2610edcb154882ba5b0e7b2a49be4ccbf6c6557835a6161ba327ab27bb47fad1b2acbe290c9f221e284f6168eb726d6e039
|
@@ -8,6 +8,7 @@ require_relative "types/lemur_summary_response"
|
|
8
8
|
require_relative "types/lemur_question"
|
9
9
|
require_relative "types/lemur_question_answer_response"
|
10
10
|
require_relative "types/lemur_action_items_response"
|
11
|
+
require_relative "types/lemur_response"
|
11
12
|
require_relative "types/purge_lemur_request_data_response"
|
12
13
|
require "async"
|
13
14
|
|
@@ -224,6 +225,29 @@ module AssemblyAI
|
|
224
225
|
AssemblyAI::Lemur::LemurActionItemsResponse.from_json(json_object: response.body)
|
225
226
|
end
|
226
227
|
|
228
|
+
# Retrieve a LeMUR response that was previously generated.
|
229
|
+
#
|
230
|
+
# @param request_id [String] The ID of the LeMUR request you previously made.
|
231
|
+
# This would be found in the response of the original request.
|
232
|
+
# @param request_options [AssemblyAI::RequestOptions]
|
233
|
+
# @return [AssemblyAI::Lemur::LemurTaskResponse, AssemblyAI::Lemur::LemurSummaryResponse, AssemblyAI::Lemur::LemurQuestionAnswerResponse, AssemblyAI::Lemur::LemurActionItemsResponse]
|
234
|
+
# @example
|
235
|
+
# api = AssemblyAI::Client.new(
|
236
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
237
|
+
# base_url: "https://api.example.com",
|
238
|
+
# api_key: "YOUR_API_KEY"
|
239
|
+
# )
|
240
|
+
# api.lemur.get_response(request_id: "request_id")
|
241
|
+
def get_response(request_id:, request_options: nil)
|
242
|
+
response = @request_client.conn.get do |req|
|
243
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
244
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
245
|
+
req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
|
246
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/lemur/v3/#{request_id}"
|
247
|
+
end
|
248
|
+
AssemblyAI::Lemur::LemurResponse.from_json(json_object: response.body)
|
249
|
+
end
|
250
|
+
|
227
251
|
# Delete the data for a previously submitted LeMUR request.
|
228
252
|
# The LLM response data, as well as any context provided in the original request
|
229
253
|
# will be removed.
|
@@ -470,6 +494,31 @@ module AssemblyAI
|
|
470
494
|
end
|
471
495
|
end
|
472
496
|
|
497
|
+
# Retrieve a LeMUR response that was previously generated.
|
498
|
+
#
|
499
|
+
# @param request_id [String] The ID of the LeMUR request you previously made.
|
500
|
+
# This would be found in the response of the original request.
|
501
|
+
# @param request_options [AssemblyAI::RequestOptions]
|
502
|
+
# @return [AssemblyAI::Lemur::LemurTaskResponse, AssemblyAI::Lemur::LemurSummaryResponse, AssemblyAI::Lemur::LemurQuestionAnswerResponse, AssemblyAI::Lemur::LemurActionItemsResponse]
|
503
|
+
# @example
|
504
|
+
# api = AssemblyAI::Client.new(
|
505
|
+
# environment: AssemblyAI::Environment::DEFAULT,
|
506
|
+
# base_url: "https://api.example.com",
|
507
|
+
# api_key: "YOUR_API_KEY"
|
508
|
+
# )
|
509
|
+
# api.lemur.get_response(request_id: "request_id")
|
510
|
+
def get_response(request_id:, request_options: nil)
|
511
|
+
Async do
|
512
|
+
response = @request_client.conn.get do |req|
|
513
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
514
|
+
req.headers["Authorization"] = request_options.api_key unless request_options&.api_key.nil?
|
515
|
+
req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
|
516
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/lemur/v3/#{request_id}"
|
517
|
+
end
|
518
|
+
AssemblyAI::Lemur::LemurResponse.from_json(json_object: response.body)
|
519
|
+
end
|
520
|
+
end
|
521
|
+
|
473
522
|
# Delete the data for a previously submitted LeMUR request.
|
474
523
|
# The LLM response data, as well as any context provided in the original request
|
475
524
|
# will be removed.
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "lemur_usage"
|
3
4
|
require "ostruct"
|
4
5
|
require "json"
|
5
6
|
|
@@ -10,6 +11,8 @@ module AssemblyAI
|
|
10
11
|
attr_reader :response
|
11
12
|
# @return [String] The ID of the LeMUR request
|
12
13
|
attr_reader :request_id
|
14
|
+
# @return [AssemblyAI::Lemur::LemurUsage] The usage numbers for the LeMUR request
|
15
|
+
attr_reader :usage
|
13
16
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
17
|
attr_reader :additional_properties
|
15
18
|
# @return [Object]
|
@@ -20,13 +23,15 @@ module AssemblyAI
|
|
20
23
|
|
21
24
|
# @param response [String] The response generated by LeMUR
|
22
25
|
# @param request_id [String] The ID of the LeMUR request
|
26
|
+
# @param usage [AssemblyAI::Lemur::LemurUsage] The usage numbers for the LeMUR request
|
23
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
28
|
# @return [AssemblyAI::Lemur::LemurActionItemsResponse]
|
25
|
-
def initialize(response:, request_id:, additional_properties: nil)
|
29
|
+
def initialize(response:, request_id:, usage:, additional_properties: nil)
|
26
30
|
@response = response
|
27
31
|
@request_id = request_id
|
32
|
+
@usage = usage
|
28
33
|
@additional_properties = additional_properties
|
29
|
-
@_field_set = { "response": response, "request_id": request_id }
|
34
|
+
@_field_set = { "response": response, "request_id": request_id, "usage": usage }
|
30
35
|
end
|
31
36
|
|
32
37
|
# Deserialize a JSON object to an instance of LemurActionItemsResponse
|
@@ -35,11 +40,19 @@ module AssemblyAI
|
|
35
40
|
# @return [AssemblyAI::Lemur::LemurActionItemsResponse]
|
36
41
|
def self.from_json(json_object:)
|
37
42
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
38
44
|
response = struct["response"]
|
39
45
|
request_id = struct["request_id"]
|
46
|
+
if parsed_json["usage"].nil?
|
47
|
+
usage = nil
|
48
|
+
else
|
49
|
+
usage = parsed_json["usage"].to_json
|
50
|
+
usage = AssemblyAI::Lemur::LemurUsage.from_json(json_object: usage)
|
51
|
+
end
|
40
52
|
new(
|
41
53
|
response: response,
|
42
54
|
request_id: request_id,
|
55
|
+
usage: usage,
|
43
56
|
additional_properties: struct
|
44
57
|
)
|
45
58
|
end
|
@@ -60,6 +73,7 @@ module AssemblyAI
|
|
60
73
|
def self.validate_raw(obj:)
|
61
74
|
obj.response.is_a?(String) != false || raise("Passed value for field obj.response is not the expected type, validation failed.")
|
62
75
|
obj.request_id.is_a?(String) != false || raise("Passed value for field obj.request_id is not the expected type, validation failed.")
|
76
|
+
AssemblyAI::Lemur::LemurUsage.validate_raw(obj: obj.usage)
|
63
77
|
end
|
64
78
|
end
|
65
79
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "lemur_usage"
|
3
4
|
require "ostruct"
|
4
5
|
require "json"
|
5
6
|
|
@@ -8,6 +9,8 @@ module AssemblyAI
|
|
8
9
|
class LemurBaseResponse
|
9
10
|
# @return [String] The ID of the LeMUR request
|
10
11
|
attr_reader :request_id
|
12
|
+
# @return [AssemblyAI::Lemur::LemurUsage] The usage numbers for the LeMUR request
|
13
|
+
attr_reader :usage
|
11
14
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
12
15
|
attr_reader :additional_properties
|
13
16
|
# @return [Object]
|
@@ -17,12 +20,14 @@ module AssemblyAI
|
|
17
20
|
OMIT = Object.new
|
18
21
|
|
19
22
|
# @param request_id [String] The ID of the LeMUR request
|
23
|
+
# @param usage [AssemblyAI::Lemur::LemurUsage] The usage numbers for the LeMUR request
|
20
24
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
21
25
|
# @return [AssemblyAI::Lemur::LemurBaseResponse]
|
22
|
-
def initialize(request_id:, additional_properties: nil)
|
26
|
+
def initialize(request_id:, usage:, additional_properties: nil)
|
23
27
|
@request_id = request_id
|
28
|
+
@usage = usage
|
24
29
|
@additional_properties = additional_properties
|
25
|
-
@_field_set = { "request_id": request_id }
|
30
|
+
@_field_set = { "request_id": request_id, "usage": usage }
|
26
31
|
end
|
27
32
|
|
28
33
|
# Deserialize a JSON object to an instance of LemurBaseResponse
|
@@ -31,8 +36,19 @@ module AssemblyAI
|
|
31
36
|
# @return [AssemblyAI::Lemur::LemurBaseResponse]
|
32
37
|
def self.from_json(json_object:)
|
33
38
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
39
|
+
parsed_json = JSON.parse(json_object)
|
34
40
|
request_id = struct["request_id"]
|
35
|
-
|
41
|
+
if parsed_json["usage"].nil?
|
42
|
+
usage = nil
|
43
|
+
else
|
44
|
+
usage = parsed_json["usage"].to_json
|
45
|
+
usage = AssemblyAI::Lemur::LemurUsage.from_json(json_object: usage)
|
46
|
+
end
|
47
|
+
new(
|
48
|
+
request_id: request_id,
|
49
|
+
usage: usage,
|
50
|
+
additional_properties: struct
|
51
|
+
)
|
36
52
|
end
|
37
53
|
|
38
54
|
# Serialize an instance of LemurBaseResponse to a JSON object
|
@@ -50,6 +66,7 @@ module AssemblyAI
|
|
50
66
|
# @return [Void]
|
51
67
|
def self.validate_raw(obj:)
|
52
68
|
obj.request_id.is_a?(String) != false || raise("Passed value for field obj.request_id is not the expected type, validation failed.")
|
69
|
+
AssemblyAI::Lemur::LemurUsage.validate_raw(obj: obj.usage)
|
53
70
|
end
|
54
71
|
end
|
55
72
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "lemur_question_answer"
|
4
|
+
require_relative "lemur_usage"
|
4
5
|
require "ostruct"
|
5
6
|
require "json"
|
6
7
|
|
@@ -11,6 +12,8 @@ module AssemblyAI
|
|
11
12
|
attr_reader :response
|
12
13
|
# @return [String] The ID of the LeMUR request
|
13
14
|
attr_reader :request_id
|
15
|
+
# @return [AssemblyAI::Lemur::LemurUsage] The usage numbers for the LeMUR request
|
16
|
+
attr_reader :usage
|
14
17
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
18
|
attr_reader :additional_properties
|
16
19
|
# @return [Object]
|
@@ -21,13 +24,15 @@ module AssemblyAI
|
|
21
24
|
|
22
25
|
# @param response [Array<AssemblyAI::Lemur::LemurQuestionAnswer>] The answers generated by LeMUR and their questions
|
23
26
|
# @param request_id [String] The ID of the LeMUR request
|
27
|
+
# @param usage [AssemblyAI::Lemur::LemurUsage] The usage numbers for the LeMUR request
|
24
28
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
29
|
# @return [AssemblyAI::Lemur::LemurQuestionAnswerResponse]
|
26
|
-
def initialize(response:, request_id:, additional_properties: nil)
|
30
|
+
def initialize(response:, request_id:, usage:, additional_properties: nil)
|
27
31
|
@response = response
|
28
32
|
@request_id = request_id
|
33
|
+
@usage = usage
|
29
34
|
@additional_properties = additional_properties
|
30
|
-
@_field_set = { "response": response, "request_id": request_id }
|
35
|
+
@_field_set = { "response": response, "request_id": request_id, "usage": usage }
|
31
36
|
end
|
32
37
|
|
33
38
|
# Deserialize a JSON object to an instance of LemurQuestionAnswerResponse
|
@@ -42,9 +47,16 @@ module AssemblyAI
|
|
42
47
|
AssemblyAI::Lemur::LemurQuestionAnswer.from_json(json_object: v)
|
43
48
|
end
|
44
49
|
request_id = struct["request_id"]
|
50
|
+
if parsed_json["usage"].nil?
|
51
|
+
usage = nil
|
52
|
+
else
|
53
|
+
usage = parsed_json["usage"].to_json
|
54
|
+
usage = AssemblyAI::Lemur::LemurUsage.from_json(json_object: usage)
|
55
|
+
end
|
45
56
|
new(
|
46
57
|
response: response,
|
47
58
|
request_id: request_id,
|
59
|
+
usage: usage,
|
48
60
|
additional_properties: struct
|
49
61
|
)
|
50
62
|
end
|
@@ -65,6 +77,7 @@ module AssemblyAI
|
|
65
77
|
def self.validate_raw(obj:)
|
66
78
|
obj.response.is_a?(Array) != false || raise("Passed value for field obj.response is not the expected type, validation failed.")
|
67
79
|
obj.request_id.is_a?(String) != false || raise("Passed value for field obj.request_id is not the expected type, validation failed.")
|
80
|
+
AssemblyAI::Lemur::LemurUsage.validate_raw(obj: obj.usage)
|
68
81
|
end
|
69
82
|
end
|
70
83
|
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "json"
|
4
|
+
require_relative "lemur_task_response"
|
5
|
+
require_relative "lemur_summary_response"
|
6
|
+
require_relative "lemur_question_answer_response"
|
7
|
+
require_relative "lemur_action_items_response"
|
8
|
+
|
9
|
+
module AssemblyAI
|
10
|
+
class Lemur
|
11
|
+
class LemurResponse
|
12
|
+
# Deserialize a JSON object to an instance of LemurResponse
|
13
|
+
#
|
14
|
+
# @param json_object [String]
|
15
|
+
# @return [AssemblyAI::Lemur::LemurResponse]
|
16
|
+
def self.from_json(json_object:)
|
17
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
18
|
+
begin
|
19
|
+
AssemblyAI::Lemur::LemurTaskResponse.validate_raw(obj: struct)
|
20
|
+
return AssemblyAI::Lemur::LemurTaskResponse.from_json(json_object: json_object) unless json_object.nil?
|
21
|
+
|
22
|
+
return nil
|
23
|
+
rescue StandardError
|
24
|
+
# noop
|
25
|
+
end
|
26
|
+
begin
|
27
|
+
AssemblyAI::Lemur::LemurSummaryResponse.validate_raw(obj: struct)
|
28
|
+
return AssemblyAI::Lemur::LemurSummaryResponse.from_json(json_object: json_object) unless json_object.nil?
|
29
|
+
|
30
|
+
return nil
|
31
|
+
rescue StandardError
|
32
|
+
# noop
|
33
|
+
end
|
34
|
+
begin
|
35
|
+
AssemblyAI::Lemur::LemurQuestionAnswerResponse.validate_raw(obj: struct)
|
36
|
+
unless json_object.nil?
|
37
|
+
return AssemblyAI::Lemur::LemurQuestionAnswerResponse.from_json(json_object: json_object)
|
38
|
+
end
|
39
|
+
|
40
|
+
return nil
|
41
|
+
rescue StandardError
|
42
|
+
# noop
|
43
|
+
end
|
44
|
+
begin
|
45
|
+
AssemblyAI::Lemur::LemurActionItemsResponse.validate_raw(obj: struct)
|
46
|
+
return AssemblyAI::Lemur::LemurActionItemsResponse.from_json(json_object: json_object) unless json_object.nil?
|
47
|
+
|
48
|
+
return nil
|
49
|
+
rescue StandardError
|
50
|
+
# noop
|
51
|
+
end
|
52
|
+
struct
|
53
|
+
end
|
54
|
+
|
55
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
56
|
+
# hash and check each fields type against the current object's property
|
57
|
+
# definitions.
|
58
|
+
#
|
59
|
+
# @param obj [Object]
|
60
|
+
# @return [Void]
|
61
|
+
def self.validate_raw(obj:)
|
62
|
+
begin
|
63
|
+
return AssemblyAI::Lemur::LemurTaskResponse.validate_raw(obj: obj)
|
64
|
+
rescue StandardError
|
65
|
+
# noop
|
66
|
+
end
|
67
|
+
begin
|
68
|
+
return AssemblyAI::Lemur::LemurSummaryResponse.validate_raw(obj: obj)
|
69
|
+
rescue StandardError
|
70
|
+
# noop
|
71
|
+
end
|
72
|
+
begin
|
73
|
+
return AssemblyAI::Lemur::LemurQuestionAnswerResponse.validate_raw(obj: obj)
|
74
|
+
rescue StandardError
|
75
|
+
# noop
|
76
|
+
end
|
77
|
+
begin
|
78
|
+
return AssemblyAI::Lemur::LemurActionItemsResponse.validate_raw(obj: obj)
|
79
|
+
rescue StandardError
|
80
|
+
# noop
|
81
|
+
end
|
82
|
+
raise("Passed value matched no type within the union, validation failed.")
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "lemur_usage"
|
3
4
|
require "ostruct"
|
4
5
|
require "json"
|
5
6
|
|
@@ -10,6 +11,8 @@ module AssemblyAI
|
|
10
11
|
attr_reader :response
|
11
12
|
# @return [String] The ID of the LeMUR request
|
12
13
|
attr_reader :request_id
|
14
|
+
# @return [AssemblyAI::Lemur::LemurUsage] The usage numbers for the LeMUR request
|
15
|
+
attr_reader :usage
|
13
16
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
17
|
attr_reader :additional_properties
|
15
18
|
# @return [Object]
|
@@ -20,13 +23,15 @@ module AssemblyAI
|
|
20
23
|
|
21
24
|
# @param response [String] The response generated by LeMUR
|
22
25
|
# @param request_id [String] The ID of the LeMUR request
|
26
|
+
# @param usage [AssemblyAI::Lemur::LemurUsage] The usage numbers for the LeMUR request
|
23
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
28
|
# @return [AssemblyAI::Lemur::LemurSummaryResponse]
|
25
|
-
def initialize(response:, request_id:, additional_properties: nil)
|
29
|
+
def initialize(response:, request_id:, usage:, additional_properties: nil)
|
26
30
|
@response = response
|
27
31
|
@request_id = request_id
|
32
|
+
@usage = usage
|
28
33
|
@additional_properties = additional_properties
|
29
|
-
@_field_set = { "response": response, "request_id": request_id }
|
34
|
+
@_field_set = { "response": response, "request_id": request_id, "usage": usage }
|
30
35
|
end
|
31
36
|
|
32
37
|
# Deserialize a JSON object to an instance of LemurSummaryResponse
|
@@ -35,11 +40,19 @@ module AssemblyAI
|
|
35
40
|
# @return [AssemblyAI::Lemur::LemurSummaryResponse]
|
36
41
|
def self.from_json(json_object:)
|
37
42
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
38
44
|
response = struct["response"]
|
39
45
|
request_id = struct["request_id"]
|
46
|
+
if parsed_json["usage"].nil?
|
47
|
+
usage = nil
|
48
|
+
else
|
49
|
+
usage = parsed_json["usage"].to_json
|
50
|
+
usage = AssemblyAI::Lemur::LemurUsage.from_json(json_object: usage)
|
51
|
+
end
|
40
52
|
new(
|
41
53
|
response: response,
|
42
54
|
request_id: request_id,
|
55
|
+
usage: usage,
|
43
56
|
additional_properties: struct
|
44
57
|
)
|
45
58
|
end
|
@@ -60,6 +73,7 @@ module AssemblyAI
|
|
60
73
|
def self.validate_raw(obj:)
|
61
74
|
obj.response.is_a?(String) != false || raise("Passed value for field obj.response is not the expected type, validation failed.")
|
62
75
|
obj.request_id.is_a?(String) != false || raise("Passed value for field obj.request_id is not the expected type, validation failed.")
|
76
|
+
AssemblyAI::Lemur::LemurUsage.validate_raw(obj: obj.usage)
|
63
77
|
end
|
64
78
|
end
|
65
79
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "lemur_usage"
|
3
4
|
require "ostruct"
|
4
5
|
require "json"
|
5
6
|
|
@@ -10,6 +11,8 @@ module AssemblyAI
|
|
10
11
|
attr_reader :response
|
11
12
|
# @return [String] The ID of the LeMUR request
|
12
13
|
attr_reader :request_id
|
14
|
+
# @return [AssemblyAI::Lemur::LemurUsage] The usage numbers for the LeMUR request
|
15
|
+
attr_reader :usage
|
13
16
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
14
17
|
attr_reader :additional_properties
|
15
18
|
# @return [Object]
|
@@ -20,13 +23,15 @@ module AssemblyAI
|
|
20
23
|
|
21
24
|
# @param response [String] The response generated by LeMUR.
|
22
25
|
# @param request_id [String] The ID of the LeMUR request
|
26
|
+
# @param usage [AssemblyAI::Lemur::LemurUsage] The usage numbers for the LeMUR request
|
23
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
24
28
|
# @return [AssemblyAI::Lemur::LemurTaskResponse]
|
25
|
-
def initialize(response:, request_id:, additional_properties: nil)
|
29
|
+
def initialize(response:, request_id:, usage:, additional_properties: nil)
|
26
30
|
@response = response
|
27
31
|
@request_id = request_id
|
32
|
+
@usage = usage
|
28
33
|
@additional_properties = additional_properties
|
29
|
-
@_field_set = { "response": response, "request_id": request_id }
|
34
|
+
@_field_set = { "response": response, "request_id": request_id, "usage": usage }
|
30
35
|
end
|
31
36
|
|
32
37
|
# Deserialize a JSON object to an instance of LemurTaskResponse
|
@@ -35,11 +40,19 @@ module AssemblyAI
|
|
35
40
|
# @return [AssemblyAI::Lemur::LemurTaskResponse]
|
36
41
|
def self.from_json(json_object:)
|
37
42
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
+
parsed_json = JSON.parse(json_object)
|
38
44
|
response = struct["response"]
|
39
45
|
request_id = struct["request_id"]
|
46
|
+
if parsed_json["usage"].nil?
|
47
|
+
usage = nil
|
48
|
+
else
|
49
|
+
usage = parsed_json["usage"].to_json
|
50
|
+
usage = AssemblyAI::Lemur::LemurUsage.from_json(json_object: usage)
|
51
|
+
end
|
40
52
|
new(
|
41
53
|
response: response,
|
42
54
|
request_id: request_id,
|
55
|
+
usage: usage,
|
43
56
|
additional_properties: struct
|
44
57
|
)
|
45
58
|
end
|
@@ -60,6 +73,7 @@ module AssemblyAI
|
|
60
73
|
def self.validate_raw(obj:)
|
61
74
|
obj.response.is_a?(String) != false || raise("Passed value for field obj.response is not the expected type, validation failed.")
|
62
75
|
obj.request_id.is_a?(String) != false || raise("Passed value for field obj.request_id is not the expected type, validation failed.")
|
76
|
+
AssemblyAI::Lemur::LemurUsage.validate_raw(obj: obj.usage)
|
63
77
|
end
|
64
78
|
end
|
65
79
|
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module AssemblyAI
|
7
|
+
class Lemur
|
8
|
+
# The usage numbers for the LeMUR request
|
9
|
+
class LemurUsage
|
10
|
+
# @return [Integer] The number of input tokens used by the model
|
11
|
+
attr_reader :input_tokens
|
12
|
+
# @return [Integer] The number of output tokens generated by the model
|
13
|
+
attr_reader :output_tokens
|
14
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
|
+
attr_reader :additional_properties
|
16
|
+
# @return [Object]
|
17
|
+
attr_reader :_field_set
|
18
|
+
protected :_field_set
|
19
|
+
|
20
|
+
OMIT = Object.new
|
21
|
+
|
22
|
+
# @param input_tokens [Integer] The number of input tokens used by the model
|
23
|
+
# @param output_tokens [Integer] The number of output tokens generated by the model
|
24
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
+
# @return [AssemblyAI::Lemur::LemurUsage]
|
26
|
+
def initialize(input_tokens:, output_tokens:, additional_properties: nil)
|
27
|
+
@input_tokens = input_tokens
|
28
|
+
@output_tokens = output_tokens
|
29
|
+
@additional_properties = additional_properties
|
30
|
+
@_field_set = { "input_tokens": input_tokens, "output_tokens": output_tokens }
|
31
|
+
end
|
32
|
+
|
33
|
+
# Deserialize a JSON object to an instance of LemurUsage
|
34
|
+
#
|
35
|
+
# @param json_object [String]
|
36
|
+
# @return [AssemblyAI::Lemur::LemurUsage]
|
37
|
+
def self.from_json(json_object:)
|
38
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
39
|
+
input_tokens = struct["input_tokens"]
|
40
|
+
output_tokens = struct["output_tokens"]
|
41
|
+
new(
|
42
|
+
input_tokens: input_tokens,
|
43
|
+
output_tokens: output_tokens,
|
44
|
+
additional_properties: struct
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Serialize an instance of LemurUsage to a JSON object
|
49
|
+
#
|
50
|
+
# @return [String]
|
51
|
+
def to_json(*_args)
|
52
|
+
@_field_set&.to_json
|
53
|
+
end
|
54
|
+
|
55
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
56
|
+
# hash and check each fields type against the current object's property
|
57
|
+
# definitions.
|
58
|
+
#
|
59
|
+
# @param obj [Object]
|
60
|
+
# @return [Void]
|
61
|
+
def self.validate_raw(obj:)
|
62
|
+
obj.input_tokens.is_a?(Integer) != false || raise("Passed value for field obj.input_tokens is not the expected type, validation failed.")
|
63
|
+
obj.output_tokens.is_a?(Integer) != false || raise("Passed value for field obj.output_tokens is not the expected type, validation failed.")
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -75,10 +75,15 @@ module AssemblyAI
|
|
75
75
|
deprecate_conformer2(speech_model: speech_model)
|
76
76
|
transcript = submit(audio_url: audio_url, speech_model: speech_model, language_code: language_code, punctuate: punctuate, format_text: format_text, dual_channel: dual_channel,
|
77
77
|
webhook_url: webhook_url, webhook_auth_header_name: webhook_auth_header_name, webhook_auth_header_value: webhook_auth_header_value, auto_highlights: auto_highlights, audio_start_from: audio_start_from, audio_end_at: audio_end_at, word_boost: word_boost, boost_param: boost_param, filter_profanity: filter_profanity, redact_pii: redact_pii, redact_pii_audio: redact_pii_audio, redact_pii_audio_quality: redact_pii_audio_quality, redact_pii_policies: redact_pii_policies, redact_pii_sub: redact_pii_sub, speaker_labels: speaker_labels, speakers_expected: speakers_expected, content_safety: content_safety, content_safety_confidence: content_safety_confidence, iab_categories: iab_categories, language_detection: language_detection, custom_spelling: custom_spelling, disfluencies: disfluencies, sentiment_analysis: sentiment_analysis, auto_chapters: auto_chapters, entity_detection: entity_detection, speech_threshold: speech_threshold, summarization: summarization, summary_model: summary_model, summary_type: summary_type, custom_topics: custom_topics, topics: topics, additional_properties: additional_properties, request_options: request_options)
|
78
|
-
|
78
|
+
wait_until_ready(transcript_id: transcript.id, polling_options: polling_options)
|
79
79
|
end
|
80
80
|
|
81
|
-
|
81
|
+
# Wait until the transcript is ready. The transcript is ready when the "status" is "completed".
|
82
|
+
#
|
83
|
+
# @param transcript_id [String] ID of the transcript
|
84
|
+
# @param polling_options [PollingOptions]
|
85
|
+
# @return [Transcripts::Transcript]
|
86
|
+
def wait_until_ready(transcript_id:, polling_options: Transcripts::PollingOptions.new)
|
82
87
|
start_time = Time.now
|
83
88
|
timeout_in_seconds = polling_options.timeout / 1000 if polling_options.timeout.positive?
|
84
89
|
loop do
|
@@ -97,7 +102,8 @@ module AssemblyAI
|
|
97
102
|
def deprecate_conformer2(speech_model: nil)
|
98
103
|
warn "[DEPRECATION] `conformer-2` is deprecated. Please use `best` or `nano` instead." if speech_model == "conformer-2"
|
99
104
|
end
|
100
|
-
|
105
|
+
|
106
|
+
private :deprecate_conformer2
|
101
107
|
end
|
102
108
|
|
103
109
|
# :nodoc:
|
@@ -155,18 +161,23 @@ module AssemblyAI
|
|
155
161
|
Async do
|
156
162
|
transcript = submit(audio_url: audio_url, speech_model: speech_model, language_code: language_code, punctuate: punctuate, format_text: format_text, dual_channel: dual_channel,
|
157
163
|
webhook_url: webhook_url, webhook_auth_header_name: webhook_auth_header_name, webhook_auth_header_value: webhook_auth_header_value, auto_highlights: auto_highlights, audio_start_from: audio_start_from, audio_end_at: audio_end_at, word_boost: word_boost, boost_param: boost_param, filter_profanity: filter_profanity, redact_pii: redact_pii, redact_pii_audio: redact_pii_audio, redact_pii_audio_quality: redact_pii_audio_quality, redact_pii_policies: redact_pii_policies, redact_pii_sub: redact_pii_sub, speaker_labels: speaker_labels, speakers_expected: speakers_expected, content_safety: content_safety, content_safety_confidence: content_safety_confidence, iab_categories: iab_categories, language_detection: language_detection, custom_spelling: custom_spelling, disfluencies: disfluencies, sentiment_analysis: sentiment_analysis, auto_chapters: auto_chapters, entity_detection: entity_detection, speech_threshold: speech_threshold, summarization: summarization, summary_model: summary_model, summary_type: summary_type, custom_topics: custom_topics, topics: topics, additional_properties: additional_properties, request_options: request_options).wait
|
158
|
-
|
164
|
+
wait_until_ready(transcript_id: transcript.id, polling_options: polling_options).wait
|
159
165
|
end
|
160
166
|
end
|
161
167
|
|
162
|
-
|
168
|
+
# Wait until the transcript is ready. The transcript is ready when the "status" is "completed".
|
169
|
+
#
|
170
|
+
# @param transcript_id [String] ID of the transcript
|
171
|
+
# @param polling_options [PollingOptions]
|
172
|
+
# @return [Transcripts::Transcript]
|
173
|
+
def wait_until_ready(transcript_id:, polling_options: Transcripts::PollingOptions.new)
|
163
174
|
Async do
|
164
175
|
start_time = Time.now
|
165
176
|
timeout_in_seconds = polling_options.timeout / 1000 if polling_options.timeout.positive?
|
166
177
|
loop do
|
167
|
-
transcript = get(transcript_id: transcript_id)
|
178
|
+
transcript = get(transcript_id: transcript_id)
|
168
179
|
if transcript.status == Transcripts::TranscriptStatus::COMPLETED || transcript.status == Transcripts::TranscriptStatus::ERROR
|
169
|
-
|
180
|
+
return transcript
|
170
181
|
elsif polling_options.timeout.positive? && Time.now - start_time > timeout_in_seconds
|
171
182
|
raise StandardError, "Polling timeout"
|
172
183
|
end
|
@@ -180,6 +191,7 @@ module AssemblyAI
|
|
180
191
|
def deprecate_conformer2(speech_model:)
|
181
192
|
warn "[DEPRECATION] `conformer-2` is deprecated. Please use `best` or `nano` instead." if speech_model == "conformer-2"
|
182
193
|
end
|
183
|
-
|
194
|
+
|
195
|
+
private :deprecate_conformer2
|
184
196
|
end
|
185
197
|
end
|
data/lib/assemblyai.rb
CHANGED
@@ -14,14 +14,15 @@ module AssemblyAI
|
|
14
14
|
class Client
|
15
15
|
attr_reader :files, :transcripts, :realtime, :lemur
|
16
16
|
|
17
|
+
# @param api_key [String]
|
17
18
|
# @param environment [Environment]
|
18
19
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
19
20
|
# @param timeout_in_seconds [Long]
|
20
|
-
# @param
|
21
|
+
# @param user_agent [AssemblyAI::UserAgent]
|
21
22
|
# @return [Client]
|
22
|
-
def initialize(api_key:, environment: Environment::DEFAULT, max_retries: nil, timeout_in_seconds: nil)
|
23
|
+
def initialize(api_key:, environment: Environment::DEFAULT, max_retries: nil, timeout_in_seconds: nil, user_agent: nil)
|
23
24
|
@request_client = RequestClient.new(environment: environment, max_retries: max_retries,
|
24
|
-
timeout_in_seconds: timeout_in_seconds, api_key: api_key)
|
25
|
+
timeout_in_seconds: timeout_in_seconds, api_key: api_key, user_agent: user_agent)
|
25
26
|
@files = FilesClient.new(request_client: @request_client)
|
26
27
|
@transcripts = TranscriptsClient.new(request_client: @request_client)
|
27
28
|
@realtime = RealtimeClient.new(request_client: @request_client)
|
@@ -32,14 +33,15 @@ module AssemblyAI
|
|
32
33
|
class AsyncClient
|
33
34
|
attr_reader :files, :transcripts, :realtime, :lemur
|
34
35
|
|
36
|
+
# @param api_key [String]
|
35
37
|
# @param environment [Environment]
|
36
38
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
37
39
|
# @param timeout_in_seconds [Long]
|
38
|
-
# @param
|
40
|
+
# @param user_agent [AssemblyAI::UserAgent]
|
39
41
|
# @return [AsyncClient]
|
40
|
-
def initialize(api_key:, environment: Environment::DEFAULT, max_retries: nil, timeout_in_seconds: nil)
|
42
|
+
def initialize(api_key:, environment: Environment::DEFAULT, max_retries: nil, timeout_in_seconds: nil, user_agent: nil)
|
41
43
|
@async_request_client = AsyncRequestClient.new(environment: environment, max_retries: max_retries,
|
42
|
-
timeout_in_seconds: timeout_in_seconds, api_key: api_key)
|
44
|
+
timeout_in_seconds: timeout_in_seconds, api_key: api_key, user_agent: user_agent)
|
43
45
|
@files = AsyncFilesClient.new(request_client: @async_request_client)
|
44
46
|
@transcripts = AsyncTranscriptsClient.new(request_client: @async_request_client)
|
45
47
|
@realtime = AsyncRealtimeClient.new(request_client: @async_request_client)
|
data/lib/gemconfig.rb
CHANGED
@@ -2,11 +2,12 @@
|
|
2
2
|
|
3
3
|
module AssemblyAI
|
4
4
|
module Gemconfig
|
5
|
-
VERSION = ""
|
5
|
+
VERSION = "1.0.0-beta.12"
|
6
6
|
AUTHORS = [""].freeze
|
7
|
-
EMAIL = ""
|
8
|
-
SUMMARY = ""
|
9
|
-
DESCRIPTION = "
|
7
|
+
EMAIL = "support@assemblyai.com"
|
8
|
+
SUMMARY = "AssemblyAI Ruby SDK"
|
9
|
+
DESCRIPTION = "The AssemblyAI Ruby SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async, audio intelligence models, as well as the latest LeMUR models.
|
10
|
+
The Ruby SDK does not support Streaming STT at this time."
|
10
11
|
HOMEPAGE = "https://github.com/AssemblyAI/assemblyai-ruby-sdk"
|
11
12
|
SOURCE_CODE_URI = "https://github.com/AssemblyAI/assemblyai-ruby-sdk"
|
12
13
|
CHANGELOG_URI = "https://github.com/AssemblyAI/assemblyai-ruby-sdk/blob/master/CHANGELOG.md"
|
data/lib/requests.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "environment"
|
4
|
+
require_relative "user_agent"
|
4
5
|
require "faraday"
|
5
6
|
require "faraday/retry"
|
6
7
|
require "async/http/faraday"
|
@@ -16,21 +17,23 @@ module AssemblyAI
|
|
16
17
|
# @return [String]
|
17
18
|
attr_reader :default_environment
|
18
19
|
|
20
|
+
# @param api_key [String]
|
19
21
|
# @param environment [AssemblyAI::Environment]
|
20
22
|
# @param base_url [String]
|
21
23
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
22
24
|
# @param timeout_in_seconds [Long]
|
23
|
-
# @param
|
25
|
+
# @param user_agent [AssemblyAI::UserAgent]
|
24
26
|
# @return [AssemblyAI::RequestClient]
|
25
27
|
def initialize(api_key:, environment: AssemblyAI::Environment::DEFAULT, base_url: nil, max_retries: nil,
|
26
|
-
timeout_in_seconds: nil)
|
28
|
+
timeout_in_seconds: nil, user_agent: nil)
|
27
29
|
@default_environment = environment
|
28
30
|
@base_url = environment || base_url
|
29
31
|
@headers = {
|
30
32
|
"X-Fern-Language": "Ruby",
|
31
33
|
"X-Fern-SDK-Name": "assemblyai",
|
32
|
-
"X-Fern-SDK-Version":
|
33
|
-
"Authorization": api_key.to_s
|
34
|
+
"X-Fern-SDK-Version": AssemblyAI::Gemconfig::VERSION,
|
35
|
+
"Authorization": api_key.to_s,
|
36
|
+
"User-Agent": AssemblyAI::UserAgent.merge(AssemblyAI::DefaultUserAgent.instance.user_agent, user_agent).serialize
|
34
37
|
}
|
35
38
|
@conn = Faraday.new(headers: @headers) do |faraday|
|
36
39
|
faraday.request :json
|
@@ -62,16 +65,18 @@ module AssemblyAI
|
|
62
65
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
63
66
|
# @param timeout_in_seconds [Long]
|
64
67
|
# @param api_key [String]
|
68
|
+
# @param user_agent [AssemblyAI::UserAgent]
|
65
69
|
# @return [AssemblyAI::AsyncRequestClient]
|
66
70
|
def initialize(api_key:, environment: AssemblyAI::Environment::DEFAULT, base_url: nil, max_retries: nil,
|
67
|
-
timeout_in_seconds: nil)
|
71
|
+
timeout_in_seconds: nil, user_agent: nil)
|
68
72
|
@default_environment = environment
|
69
73
|
@base_url = environment || base_url
|
70
74
|
@headers = {
|
71
75
|
"X-Fern-Language": "Ruby",
|
72
76
|
"X-Fern-SDK-Name": "assemblyai",
|
73
|
-
"X-Fern-SDK-Version":
|
74
|
-
"Authorization": api_key.to_s
|
77
|
+
"X-Fern-SDK-Version": AssemblyAI::Gemconfig::VERSION,
|
78
|
+
"Authorization": api_key.to_s,
|
79
|
+
"User-Agent": AssemblyAI::UserAgent.merge(AssemblyAI::DefaultUserAgent.instance.user_agent, user_agent).serialize
|
75
80
|
}
|
76
81
|
@conn = Faraday.new(headers: @headers) do |faraday|
|
77
82
|
faraday.request :json
|
data/lib/types_export.rb
CHANGED
@@ -66,16 +66,18 @@ require_relative "assemblyai/realtime/types/audio_encoding"
|
|
66
66
|
require_relative "assemblyai/realtime/types/realtime_temporary_token_response"
|
67
67
|
require_relative "assemblyai/lemur/types/purge_lemur_request_data_response"
|
68
68
|
require_relative "assemblyai/lemur/types/lemur_base_response"
|
69
|
+
require_relative "assemblyai/lemur/types/lemur_task_response"
|
69
70
|
require_relative "assemblyai/lemur/types/lemur_summary_response"
|
70
71
|
require_relative "assemblyai/lemur/types/lemur_question_answer_response"
|
71
72
|
require_relative "assemblyai/lemur/types/lemur_question_answer"
|
72
73
|
require_relative "assemblyai/lemur/types/lemur_action_items_response"
|
73
|
-
require_relative "assemblyai/lemur/types/
|
74
|
+
require_relative "assemblyai/lemur/types/lemur_response"
|
74
75
|
require_relative "assemblyai/lemur/types/lemur_base_params_context"
|
75
76
|
require_relative "assemblyai/lemur/types/lemur_base_params"
|
76
77
|
require_relative "assemblyai/lemur/types/lemur_question_context"
|
77
78
|
require_relative "assemblyai/lemur/types/lemur_question"
|
78
79
|
require_relative "assemblyai/lemur/types/lemur_model"
|
80
|
+
require_relative "assemblyai/lemur/types/lemur_usage"
|
79
81
|
require_relative "assemblyai/streaming/types/streaming"
|
80
82
|
require_relative "assemblyai/streaming/types/receive_message"
|
81
83
|
require_relative "assemblyai/streaming/types/send_message"
|
data/lib/user_agent.rb
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "singleton"
|
4
|
+
|
5
|
+
module AssemblyAI
|
6
|
+
class UserAgentItem
|
7
|
+
attr_reader :name, :value, :version
|
8
|
+
|
9
|
+
def initialize(name:, version:)
|
10
|
+
@name = name
|
11
|
+
@version = version
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class UserAgent
|
16
|
+
attr_reader :user_agent_items
|
17
|
+
|
18
|
+
def initialize
|
19
|
+
@user_agent_items = {}
|
20
|
+
end
|
21
|
+
|
22
|
+
# @param key [String]
|
23
|
+
# @param user_agent_item [AssemblyAI::UserAgentItem]
|
24
|
+
def add_item(key, user_agent_item)
|
25
|
+
if user_agent_item.nil?
|
26
|
+
@user_agent_items.delete(key)
|
27
|
+
else
|
28
|
+
@user_agent_items[key] = user_agent_item
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# @param user_agent1 [AssemblyAI::UserAgent]
|
33
|
+
# @param user_agent2 [AssemblyAI::UserAgent]
|
34
|
+
# @return [AssemblyAI::UserAgent]
|
35
|
+
def self.merge(user_agent1, user_agent2)
|
36
|
+
merged_user_agent = UserAgent.new
|
37
|
+
|
38
|
+
user_agent1&.user_agent_items&.each do |key, item|
|
39
|
+
merged_user_agent.add_item(key, item)
|
40
|
+
end
|
41
|
+
|
42
|
+
user_agent2&.user_agent_items&.each do |key, item|
|
43
|
+
merged_user_agent.add_item(key, item)
|
44
|
+
end
|
45
|
+
|
46
|
+
merged_user_agent
|
47
|
+
end
|
48
|
+
|
49
|
+
# @return [String]
|
50
|
+
def serialize
|
51
|
+
serialized_items = @user_agent_items.map do |key, item|
|
52
|
+
"#{key}=#{item.name}/#{item.version}"
|
53
|
+
end.join(" ")
|
54
|
+
|
55
|
+
"AssemblyAI/1.0 (#{serialized_items})"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
class DefaultUserAgent
|
60
|
+
include Singleton
|
61
|
+
|
62
|
+
attr_reader :user_agent
|
63
|
+
|
64
|
+
def initialize
|
65
|
+
@user_agent = UserAgent.new
|
66
|
+
@user_agent.add_item("sdk", UserAgentItem.new(name: "Ruby", version: AssemblyAI::Gemconfig::VERSION))
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assemblyai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.beta.
|
4
|
+
version: 1.0.0.pre.beta.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -90,8 +90,10 @@ dependencies:
|
|
90
90
|
- - "<"
|
91
91
|
- !ruby/object:Gem::Version
|
92
92
|
version: '3.0'
|
93
|
-
description:
|
94
|
-
|
93
|
+
description: |-
|
94
|
+
The AssemblyAI Ruby SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async, audio intelligence models, as well as the latest LeMUR models.
|
95
|
+
The Ruby SDK does not support Streaming STT at this time.
|
96
|
+
email: support@assemblyai.com
|
95
97
|
executables: []
|
96
98
|
extensions: []
|
97
99
|
extra_rdoc_files: []
|
@@ -109,8 +111,10 @@ files:
|
|
109
111
|
- lib/assemblyai/lemur/types/lemur_question_answer.rb
|
110
112
|
- lib/assemblyai/lemur/types/lemur_question_answer_response.rb
|
111
113
|
- lib/assemblyai/lemur/types/lemur_question_context.rb
|
114
|
+
- lib/assemblyai/lemur/types/lemur_response.rb
|
112
115
|
- lib/assemblyai/lemur/types/lemur_summary_response.rb
|
113
116
|
- lib/assemblyai/lemur/types/lemur_task_response.rb
|
117
|
+
- lib/assemblyai/lemur/types/lemur_usage.rb
|
114
118
|
- lib/assemblyai/lemur/types/purge_lemur_request_data_response.rb
|
115
119
|
- lib/assemblyai/realtime/client.rb
|
116
120
|
- lib/assemblyai/realtime/types/audio_encoding.rb
|
@@ -188,6 +192,7 @@ files:
|
|
188
192
|
- lib/gemconfig.rb
|
189
193
|
- lib/requests.rb
|
190
194
|
- lib/types_export.rb
|
195
|
+
- lib/user_agent.rb
|
191
196
|
homepage: https://github.com/AssemblyAI/assemblyai-ruby-sdk
|
192
197
|
licenses: []
|
193
198
|
metadata:
|
@@ -212,5 +217,5 @@ requirements: []
|
|
212
217
|
rubygems_version: 3.1.6
|
213
218
|
signing_key:
|
214
219
|
specification_version: 4
|
215
|
-
summary:
|
220
|
+
summary: AssemblyAI Ruby SDK
|
216
221
|
test_files: []
|