mistral_translator 0.4.0 → 0.6.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.
@@ -16,6 +16,11 @@ module MistralTranslator
16
16
  %w[content original], %w[original]
17
17
  ].freeze
18
18
 
19
+ # Garde-fous contre les réponses démesurées
20
+ MAX_CONTENT_SIZE = 1_000_000
21
+ MAX_SCAN_LENGTH = 100_000
22
+ BRACE_DEPTH = { "{" => 1, "}" => -1 }.freeze
23
+
19
24
  class << self
20
25
  def parse_translation_response(raw_content)
21
26
  return nil if raw_content.nil? || raw_content.empty?
@@ -56,25 +61,6 @@ module MistralTranslator
56
61
  end
57
62
  end
58
63
 
59
- def parse_bulk_translation_response(raw_content)
60
- return [] if raw_content.nil? || raw_content.empty?
61
-
62
- with_response_errors("bulk", raw_content) do
63
- translations = parse_response_json(raw_content, "bulk")["translations"]
64
- unless translations.is_a?(Array)
65
- raise InvalidResponseError.new("No translations array in response", raw_content)
66
- end
67
-
68
- translations.map do |translation|
69
- {
70
- index: translation["index"],
71
- original: translation["source"],
72
- translated: translation["target"]
73
- }
74
- end
75
- end
76
- end
77
-
78
64
  def parse_json_content(json_content)
79
65
  JSON.parse(json_content)
80
66
  rescue JSON::ParserError
@@ -111,118 +97,75 @@ module MistralTranslator
111
97
  raise InvalidResponseError.new("Error processing #{label} response (#{e.class})", raw_content), cause: nil
112
98
  end
113
99
 
100
+ # Le mode JSON de l'API renvoie un objet seul, lu tel quel. Sinon, on lit le premier objet
101
+ # trouvé dans le texte, en réparant les continuations de ligne.
114
102
  def parse_response_json(raw_content, label)
115
- json_content = extract_json_from_content(raw_content)
116
- raise InvalidResponseError.new("No JSON in #{label} response", raw_content) unless json_content
117
-
118
- data = parse_json_content(json_content)
103
+ ensure_content_size!(raw_content)
104
+ data = parse_whole_or_embedded(raw_content, label)
119
105
  raise InvalidResponseError.new("Unexpected JSON in #{label} response", raw_content) unless data.is_a?(Hash)
120
106
 
121
107
  data
122
- rescue JSON::ParserError
123
- details = "raw_len=#{raw_content.length} json_len=#{json_content&.length}"
124
- Logger.debug_if_verbose("JSON parse failed: #{details}", sensitive: false)
125
- raise InvalidResponseError.new("Invalid JSON in #{label} response (#{details})", raw_content), cause: nil
126
108
  end
127
109
 
128
- def extract_json_from_content(content)
129
- return nil if content.nil? || content.empty?
130
-
131
- # Limiter la taille pour éviter les attaques DoS
132
- max_content_size = 1_000_000 # 1MB max
133
- if content.length > max_content_size
134
- raise InvalidResponseError, "Response content too large (#{content.length} bytes, max: #{max_content_size})"
135
- end
110
+ def ensure_content_size!(content)
111
+ return if content.length <= MAX_CONTENT_SIZE
136
112
 
137
- # Essayer d'abord de parser directement le contenu comme JSON
138
- begin
139
- JSON.parse(content)
140
- content
141
- rescue JSON::ParserError
142
- # Si ça échoue, chercher le JSON dans la réponse (peut être entouré de texte)
143
- # Utiliser une approche plus robuste pour les JSON complexes
144
- find_json_in_text(content)
145
- end
113
+ raise InvalidResponseError, "Response content too large (#{content.length} bytes, max: #{MAX_CONTENT_SIZE})"
146
114
  end
147
115
 
148
- def find_json_in_text(text)
149
- start_pos = find_json_start(text)
150
- return nil unless start_pos
116
+ def parse_whole_or_embedded(raw_content, label)
117
+ JSON.parse(raw_content)
118
+ rescue JSON::ParserError
119
+ json_content = find_json_in_text(raw_content)
120
+ raise InvalidResponseError.new("No JSON in #{label} response", raw_content), cause: nil unless json_content
151
121
 
152
- parse_json_until_end(text, start_pos)
122
+ parse_embedded_json(json_content, raw_content, label)
153
123
  end
154
124
 
155
- def find_json_start(text)
156
- text.index("{")
125
+ def parse_embedded_json(json_content, raw_content, label)
126
+ parse_json_content(json_content)
127
+ rescue JSON::ParserError
128
+ details = "raw_len=#{raw_content.length} json_len=#{json_content.length}"
129
+ Logger.debug_if_verbose("JSON parse failed: #{details}", sensitive: false)
130
+ raise InvalidResponseError.new("Invalid JSON in #{label} response (#{details})", raw_content), cause: nil
157
131
  end
158
132
 
159
- def parse_json_until_end(text, start_pos)
160
- parser_state = JsonParserState.new
161
- max_iterations = 100_000
162
-
163
- (start_pos...text.length).each do |i|
164
- parser_state.increment_iterations
165
- if parser_state.iterations > max_iterations
166
- raise InvalidResponseError,
167
- "JSON parsing exceeded maximum iterations"
133
+ # Le premier objet du texte, de sa première accolade à celle qui la referme.
134
+ def find_json_in_text(text)
135
+ start = text.index("{")
136
+ finish = closing_brace_index(text, start) if start
137
+ text[start..finish] if finish
138
+ end
139
+
140
+ # Les accolades des chaînes ne comptent pas ; le parcours est plafonné.
141
+ def closing_brace_index(text, start)
142
+ depth = 0
143
+ in_string = false
144
+ escaped = false
145
+
146
+ (start...text.length).each do |index|
147
+ ensure_scan_length!(index - start)
148
+ char = text[index]
149
+
150
+ if escaped
151
+ escaped = false
152
+ elsif char == "\\"
153
+ escaped = true
154
+ elsif char == '"'
155
+ in_string = !in_string
156
+ elsif !in_string
157
+ depth += BRACE_DEPTH.fetch(char, 0)
158
+ return index if depth.zero?
168
159
  end
169
-
170
- char = text[i]
171
- parser_state.process_character(char)
172
-
173
- return text[start_pos..i] if parser_state.found_complete_json?
174
160
  end
175
161
 
176
162
  nil
177
163
  end
178
164
 
179
- # Helper class pour gérer l'état du parsing JSON
180
- class JsonParserState
181
- attr_reader :iterations
182
-
183
- def initialize
184
- @brace_count = 0
185
- @in_string = false
186
- @escape_next = false
187
- @iterations = 0
188
- end
189
-
190
- def increment_iterations
191
- @iterations += 1
192
- end
193
-
194
- def process_character(char)
195
- return handle_escape_character if @escape_next
196
- return handle_backslash_character if char == "\\"
197
- return handle_quote_character(char) if char == '"' && !@escape_next
198
- return if @in_string
199
-
200
- handle_brace_character(char)
201
- end
165
+ def ensure_scan_length!(scanned)
166
+ return if scanned < MAX_SCAN_LENGTH
202
167
 
203
- def handle_escape_character
204
- @escape_next = false
205
- end
206
-
207
- def handle_backslash_character
208
- @escape_next = true
209
- end
210
-
211
- def handle_quote_character(_char)
212
- @in_string = !@in_string
213
- end
214
-
215
- def handle_brace_character(char)
216
- if char == "{"
217
- @brace_count += 1
218
- elsif char == "}"
219
- @brace_count -= 1
220
- end
221
- end
222
-
223
- def found_complete_json?
224
- @brace_count.zero?
225
- end
168
+ raise InvalidResponseError, "JSON parsing exceeded maximum iterations", cause: nil
226
169
  end
227
170
 
228
171
  # Le texte traduit ou résumé : toujours une String non vide, jamais un objet ou un tableau.
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "logger"
4
+
5
+ module MistralTranslator
6
+ # Relances communes aux traductions et aux résumés.
7
+ # Le client relance déjà les 429 avec backoff : ici, quelques tentatives de plus suffisent.
8
+ module Retries
9
+ RETRY_COUNT = 3
10
+ RETRY_DELAY = 2
11
+
12
+ private
13
+
14
+ # Exécute le bloc, qui reçoit le numéro de tentative (0 pour la première).
15
+ # Une réponse inexploitable est relancée avec un backoff exponentiel, un quota dépassé
16
+ # après un délai fixe ; au-delà de RETRY_COUNT relances, l'erreur remonte.
17
+ # operation et subject nomment la requête dans les journaux, jamais son contenu.
18
+ def with_retries(operation:, subject:)
19
+ attempt = 0
20
+ begin
21
+ yield attempt
22
+ rescue EmptyTranslationError, InvalidResponseError => e
23
+ raise if attempt >= RETRY_COUNT
24
+
25
+ wait_time = RETRY_DELAY * (2**attempt)
26
+ attempt += 1
27
+ log_retry(operation, subject, e, attempt, wait_time)
28
+ sleep(wait_time)
29
+ retry
30
+ rescue RateLimitError
31
+ raise if attempt >= RETRY_COUNT
32
+
33
+ attempt += 1
34
+ log_rate_limit_hit(operation, subject)
35
+ sleep(RETRY_DELAY)
36
+ retry
37
+ end
38
+ end
39
+
40
+ def log_retry(operation, subject, error, attempt, wait_time)
41
+ message = "#{operation} retry #{attempt}/#{RETRY_COUNT} for #{subject} in #{wait_time}s: #{error.message}"
42
+ Logger.warn_once(message, key: "#{operation}_retry_#{subject}_#{error.class.name}", sensitive: false, ttl: 120)
43
+ end
44
+
45
+ def log_rate_limit_hit(operation, subject)
46
+ Logger.warn_once("Rate limit hit for #{operation} #{subject}, retrying",
47
+ key: "#{operation}_rate_limit_#{subject}", sensitive: false, ttl: 300)
48
+ end
49
+ end
50
+ end
@@ -1,13 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "logger"
4
+ require_relative "retries"
4
5
  require_relative "security"
5
6
 
6
7
  module MistralTranslator
7
8
  class Summarizer
9
+ include Retries
10
+
8
11
  DEFAULT_MAX_WORDS = 250
9
- DEFAULT_RETRY_COUNT = 3
10
- DEFAULT_RETRY_DELAY = 2
12
+ DEFAULT_RETRY_COUNT = Retries::RETRY_COUNT
13
+ DEFAULT_RETRY_DELAY = Retries::RETRY_DELAY
11
14
 
12
15
  def initialize(client: nil)
13
16
  @client = client || Client.new
@@ -84,28 +87,16 @@ module MistralTranslator
84
87
 
85
88
  private
86
89
 
87
- # Relances communes à tous les résumés ; une réponse inexploitable finit par lever une erreur.
88
- def request_summary(prompt, target_locale, attempt = 0)
89
- log_debug("Summary attempt #{attempt + 1} for #{target_locale}")
90
-
91
- result = ResponseParser.parse_summary_response(@client.complete(prompt, json: true))
92
- raise EmptyTranslationError, "Empty summary received" if result.nil? || result[:summary].to_s.empty?
90
+ # Commun à tous les résumés ; une réponse inexploitable finit par lever une erreur.
91
+ def request_summary(prompt, target_locale)
92
+ with_retries(operation: "summary", subject: target_locale) do |attempt|
93
+ log_debug("Summary attempt #{attempt + 1} for #{target_locale}")
93
94
 
94
- result[:summary]
95
- rescue EmptyTranslationError, InvalidResponseError => e
96
- raise if attempt >= DEFAULT_RETRY_COUNT
95
+ result = ResponseParser.parse_summary_response(@client.complete(prompt, json: true))
96
+ raise EmptyTranslationError, "Empty summary received" if result.nil? || result[:summary].to_s.empty?
97
97
 
98
- wait_time = DEFAULT_RETRY_DELAY * (2**attempt)
99
- log_retry(e, attempt + 1, wait_time, target_locale)
100
- sleep(wait_time)
101
- request_summary(prompt, target_locale, attempt + 1)
102
- rescue RateLimitError
103
- # Le client a déjà relancé avec backoff : quelques tentatives de plus suffisent.
104
- raise if attempt >= DEFAULT_RETRY_COUNT
105
-
106
- log_rate_limit_hit("summary", target_locale)
107
- sleep(DEFAULT_RETRY_DELAY)
108
- request_summary(prompt, target_locale, attempt + 1)
98
+ result[:summary]
99
+ end
109
100
  end
110
101
 
111
102
  def clean_document_content(content)
@@ -157,36 +148,8 @@ module MistralTranslator
157
148
  raise ArgumentError, "Long length must be greater than medium" unless long > medium
158
149
  end
159
150
 
160
- def log_retry(error, attempt, wait_time, locale)
161
- message = "Summary retry #{attempt}/#{DEFAULT_RETRY_COUNT} for #{locale} in #{wait_time}s: #{error.message}"
162
- # Log une seule fois par locale et type d'erreur
163
- Logger.warn_once(message, key: "summary_retry_#{locale}_#{error.class.name}", sensitive: false, ttl: 120)
164
- end
165
-
166
- def log_rate_limit_hit(operation, locale)
167
- message = "Rate limit hit for #{operation} in #{locale}, retrying..."
168
- # Log une seule fois par opération et locale
169
- Logger.warn_once(message, key: "summary_rate_limit_#{operation}_#{locale}", sensitive: false, ttl: 300)
170
- end
171
-
172
151
  def log_debug(message)
173
- # Log de debug seulement si mode verbose activé
174
152
  Logger.debug_if_verbose(message, sensitive: false)
175
-
176
- # Pour les tests, permettre un output dans stdout si nécessaire
177
- return unless ENV["MISTRAL_TRANSLATOR_TEST_OUTPUT"] == "true"
178
-
179
- puts "[MistralTranslator] #{message}"
180
- end
181
-
182
- def log_error(message)
183
- # Utiliser le logger centralisé
184
- Logger.warn(message, sensitive: false)
185
-
186
- # Pour les tests, optionnellement afficher en stdout
187
- return unless ENV["MISTRAL_TRANSLATOR_TEST_OUTPUT"] == "true"
188
-
189
- puts "[MistralTranslator] ERROR: #{message}"
190
153
  end
191
154
  end
192
155
  end
@@ -1,20 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "logger"
4
+ require_relative "retries"
4
5
  require_relative "translator_helpers"
5
6
  require_relative "security"
6
7
 
7
8
  module MistralTranslator
8
9
  class Translator
10
+ include Retries
9
11
  include TranslatorHelpers::InputValidator
10
- include TranslatorHelpers::RetryHandler
11
- include TranslatorHelpers::LoggingHelper
12
12
  include TranslatorHelpers::AnalysisHelper
13
13
  include TranslatorHelpers::RequestHelper
14
14
  include TranslatorHelpers::MultiTargetHelper
15
15
 
16
- DEFAULT_RETRY_COUNT = 3
17
- DEFAULT_RETRY_DELAY = 2
16
+ DEFAULT_RETRY_COUNT = Retries::RETRY_COUNT
17
+ DEFAULT_RETRY_DELAY = Retries::RETRY_DELAY
18
18
 
19
19
  def initialize(client: nil)
20
20
  @client = client || Client.new
@@ -176,29 +176,15 @@ module MistralTranslator
176
176
  nil
177
177
  end
178
178
 
179
- def translate_with_retry(text, source_locale, target_locale, attempt = 0, **options)
180
- prompt = build_prompt_for_retry(text, source_locale, target_locale, **options)
181
- request_context = build_request_context(source_locale, target_locale, attempt)
179
+ def translate_with_retry(text, source_locale, target_locale, **)
180
+ prompt = build_translation_prompt(text, source_locale, target_locale, **)
182
181
 
183
- raw_response = perform_client_request(prompt, request_context)
184
- extract_translated_text!(raw_response)
185
- rescue EmptyTranslationError, InvalidResponseError => e
186
- handle_retryable_error!(e, attempt) do
187
- translate_with_retry(text, source_locale, target_locale, attempt + 1, **options)
182
+ with_retries(operation: "translation", subject: "#{source_locale}->#{target_locale}") do |attempt|
183
+ raw_response = perform_client_request(prompt, build_request_context(source_locale, target_locale, attempt))
184
+ extract_translated_text!(raw_response)
188
185
  end
189
- rescue RateLimitError
190
- # Le client a déjà relancé avec backoff : quelques tentatives de plus suffisent.
191
- raise if attempt >= DEFAULT_RETRY_COUNT
192
-
193
- log_rate_limit_hit(source_locale, target_locale)
194
- sleep(DEFAULT_RETRY_DELAY)
195
- translate_with_retry(text, source_locale, target_locale, attempt + 1, **options)
196
186
  end
197
187
 
198
- # Ces méthodes sont héritées via RequestHelper
199
-
200
- # Log via LoggingHelper
201
-
202
188
  def build_translation_prompt(text, source_locale, target_locale, **options)
203
189
  PromptBuilder.translation_prompt(text, source_locale, target_locale,
204
190
  context: options[:context],
@@ -20,75 +20,6 @@ module MistralTranslator
20
20
  validate_inputs!(text, from, to)
21
21
  raise ArgumentError, "Target languages cannot be empty" if Array(to).empty?
22
22
  end
23
-
24
- def validate_batch_inputs!(texts, from, to)
25
- raise ArgumentError, "Texts array cannot be nil or empty" if texts.nil? || texts.empty?
26
-
27
- ensure_present!(from, "Source language")
28
- ensure_present!(to, "Target language")
29
-
30
- texts.each_with_index do |t, i|
31
- ensure_present!(t, "Text at index #{i}")
32
- end
33
- end
34
-
35
- private
36
-
37
- def ensure_present!(value, field_name)
38
- raise ArgumentError, "#{field_name} cannot be nil or empty" if value.nil? || value.to_s.strip.empty?
39
- end
40
- end
41
-
42
- # Helper pour la gestion des retry
43
- module RetryHandler
44
- DEFAULT_RETRY_DELAY = 2
45
-
46
- def handle_retry_error(error, source_locale, target_locale, attempt)
47
- case error
48
- when RateLimitError
49
- handle_rate_limit_retry?(source_locale, target_locale, attempt)
50
- when ApiError
51
- handle_api_error_retry?(error, source_locale, target_locale, attempt)
52
- else
53
- raise error
54
- end
55
- end
56
-
57
- # Renvoie true si un retry a été effectué
58
- def handle_rate_limit_retry?(source_locale, target_locale, _attempt)
59
- log_rate_limit_hit(source_locale, target_locale)
60
- sleep(DEFAULT_RETRY_DELAY)
61
- # NOTE: retry logic should be handled by the calling method
62
- true
63
- end
64
-
65
- # Renvoie true si un retry a été effectué
66
- def handle_api_error_retry?(error, _source_locale, _target_locale, attempt)
67
- raise error unless attempt < 3 && error.message.include?("timeout")
68
-
69
- Logger.warn("API timeout, retrying... (attempt #{attempt + 1})")
70
- sleep(DEFAULT_RETRY_DELAY)
71
- # NOTE: retry logic should be handled by the calling method
72
- true
73
- end
74
- end
75
-
76
- # Helper pour le logging
77
- module LoggingHelper
78
- def log_rate_limit_hit(source_locale, target_locale)
79
- message = "Rate limit hit for #{source_locale}->#{target_locale}"
80
- Logger.warn_once(message, key: "rate_limit_#{source_locale}_#{target_locale}", sensitive: false, ttl: 300)
81
- end
82
-
83
- def log_translation_attempt(source_locale, target_locale, attempt)
84
- Logger.debug("Translation attempt #{attempt} for #{source_locale}->#{target_locale}")
85
- end
86
-
87
- def log_retry(error, attempt, wait_time)
88
- default_retry_count = MistralTranslator::Translator::DEFAULT_RETRY_COUNT
89
- message = "Translation retry #{attempt}/#{default_retry_count} in #{wait_time}s: #{error.message}"
90
- Logger.warn_once(message, key: "translate_retry_#{error.class.name}_#{attempt}", sensitive: false, ttl: 120)
91
- end
92
23
  end
93
24
 
94
25
  # Helper pour l'analyse et la détection de langue
@@ -125,12 +56,13 @@ module MistralTranslator
125
56
  end
126
57
 
127
58
  # Fail-closed : une détection illisible ou une langue non supportée lève une erreur,
128
- # au lieu de supposer une langue et de renvoyer le texte non traduit.
59
+ # au lieu de supposer une langue et de renvoyer le texte non traduit. Seule la langue
60
+ # est gardée : un « fr-FR » détecté ne doit pas différer d'une cible « fr ».
129
61
  def parse_language_detection(response)
130
62
  data = JSON.parse(response.to_s)
131
63
  metadata = data["metadata"] if data.is_a?(Hash)
132
- detected = LocaleHelper.normalize_locale(metadata["detected_language"]) if metadata.is_a?(Hash)
133
- return detected if detected && LocaleHelper.locale_supported?(detected)
64
+ detected = Locale.find(metadata["detected_language"]) if metadata.is_a?(Hash)
65
+ return detected.language if detected
134
66
 
135
67
  raise InvalidResponseError.new("Language detection failed", response)
136
68
  rescue JSON::ParserError
@@ -140,17 +72,6 @@ module MistralTranslator
140
72
 
141
73
  # Helper pour requêtes client et retries
142
74
  module RequestHelper
143
- def build_prompt_for_retry(text, source_locale, target_locale, **options)
144
- build_translation_prompt(
145
- text,
146
- source_locale,
147
- target_locale,
148
- context: options[:context],
149
- glossary: options[:glossary],
150
- preserve_html: options.fetch(:preserve_html, false)
151
- )
152
- end
153
-
154
75
  def build_request_context(source_locale, target_locale, attempt)
155
76
  {
156
77
  from_locale: source_locale,
@@ -170,15 +91,6 @@ module MistralTranslator
170
91
 
171
92
  raise EmptyTranslationError
172
93
  end
173
-
174
- def handle_retryable_error!(error, attempt)
175
- raise error unless attempt < MistralTranslator::Translator::DEFAULT_RETRY_COUNT
176
-
177
- wait_time = MistralTranslator::Translator::DEFAULT_RETRY_DELAY * (2**attempt)
178
- log_retry(error, attempt + 1, wait_time)
179
- sleep(wait_time)
180
- yield
181
- end
182
94
  end
183
95
 
184
96
  # Helper pour traductions multi-cibles
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MistralTranslator
4
- VERSION = "0.4.0"
4
+ VERSION = "0.6.0"
5
5
 
6
6
  # Informations additionnelles sur la gem
7
7
  API_VERSION = "v1"
@@ -3,6 +3,7 @@
3
3
  require_relative "mistral_translator/version"
4
4
  require_relative "mistral_translator/errors"
5
5
  require_relative "mistral_translator/configuration"
6
+ require_relative "mistral_translator/locale"
6
7
  require_relative "mistral_translator/locale_helper"
7
8
  require_relative "mistral_translator/prompt_helpers"
8
9
  require_relative "mistral_translator/prompt_builder"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mistral_translator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Cherbero
@@ -160,10 +160,14 @@ files:
160
160
  - lib/mistral_translator/client_helpers.rb
161
161
  - lib/mistral_translator/configuration.rb
162
162
  - lib/mistral_translator/data/languages.json
163
+ - lib/mistral_translator/data/regions.json
164
+ - lib/mistral_translator/data/scripts.json
165
+ - lib/mistral_translator/deprecated_options.rb
163
166
  - lib/mistral_translator/errors.rb
164
167
  - lib/mistral_translator/helpers.rb
165
168
  - lib/mistral_translator/helpers_extensions.rb
166
169
  - lib/mistral_translator/levenshtein_helpers.rb
170
+ - lib/mistral_translator/locale.rb
167
171
  - lib/mistral_translator/locale_helper.rb
168
172
  - lib/mistral_translator/logger.rb
169
173
  - lib/mistral_translator/prompt.rb
@@ -172,6 +176,7 @@ files:
172
176
  - lib/mistral_translator/prompt_metadata_helpers.rb
173
177
  - lib/mistral_translator/proxy.rb
174
178
  - lib/mistral_translator/response_parser.rb
179
+ - lib/mistral_translator/retries.rb
175
180
  - lib/mistral_translator/security.rb
176
181
  - lib/mistral_translator/summarizer.rb
177
182
  - lib/mistral_translator/translator.rb