deepl-rb 3.4.0 → 3.5.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +14 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00b711743a7d8a7e5851e6985f624376f669ecaff43a25437485f77b42970b1c
4
- data.tar.gz: b75a87f8ba086f6d8d7f67f5c7f955a95488722032d4d0c19547a1aa16b19156
3
+ metadata.gz: eac62f1d4905c35c5e4555195f6a913dec6eb9ac3c739f4086ad39b127995843
4
+ data.tar.gz: d9cfb63f11fc42bc7301f0316ec8f2707b06ce8d073e28c012ef5042119ff34b
5
5
  SHA512:
6
- metadata.gz: 8bd6e8200cae9ab13b19a20a30743e292074311f437e3c58658a176a4489f39667ca4d2dd056c36d0e76fade63b2832e3a8fb478bce348d6e746acb82ad07511
7
- data.tar.gz: aa9bfb1bc15e12dbe612e68796651b20d7aeeef021fac5d5feb391dc9a55f6c3b22e8257b9b228d6bd62d826833fdf7022c42fd1b97411bbf4695ea69f7acf08
6
+ metadata.gz: 27f36601632c94c1acab90683eaa44a60f21545095438e0c67e609092accf5265eb6c23200f0056a1085d09e443e4bf9a2ca759a1673c3ea347f727518ea402b
7
+ data.tar.gz: 4508f77f501fa9789a73c86aba21414f73b4664c4baff9c46e5e4e2207f80865147269aaf59f83d42b538423577a3324a64c8cb95c667dfda87b7213a2b38bf3
data/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [3.5.0] - 2025-12-03
8
+ ### Added
9
+ - Added `custom_instructions` parameter to `translate()` to customize translation
10
+ behavior with up to 10 instructions (max 300 characters each). Only supported for
11
+ target languages: `de`, `en`, `es`, `fr`, `it`, `ja`, `ko`, `zh` and their variants.
12
+ Note: using the `custom_instructions` parameter will use the `quality_optimized`
13
+ model type as the default. Requests combining `custom_instructions` and the
14
+ `latency_optimized` model type will be rejected.
15
+
7
16
  ## [3.4.0] - 2025-11-17
8
17
  ### Added
9
18
  - Added support for the `GET /v3/style_rules` endpoint in the client library, the
@@ -71,6 +80,7 @@ The change in major version is only due to the change in maintainership, there i
71
80
  ### Fixed
72
81
  - Make RequestEntityTooLarge error message more clear
73
82
 
83
+ [3.5.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.4.0...v3.5.0
74
84
  [3.4.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.3.0...v3.4.0
75
85
  [3.3.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.2.0...v3.3.0
76
86
  [3.2.0]: https://github.com/DeepLcom/deepl-rb/compare/v3.1.0...v3.2.0
data/README.md CHANGED
@@ -153,6 +153,19 @@ This would use next-gen translation models for the translation. The available va
153
153
  - `'latency_optimized'`: use a translation model that minimizes response time, at the cost
154
154
  of translation quality.
155
155
 
156
+ To translate with custom instructions, supply the `custom_instructions` parameter:
157
+
158
+ ```rb
159
+ translation = DeepL.translate 'Hello, world!', 'EN', 'DE',
160
+ custom_instructions: ['Use informal language', 'Be concise']
161
+
162
+ puts translation.text
163
+ ```
164
+
165
+ Up to 10 custom instructions can be specified, each with a maximum of 300 characters.
166
+ The target language must be `de`, `en`, `es`, `fr`, `it`, `ja`, `ko`, `zh` or any variants.
167
+ Note that using `custom_instructions` will automatically use `quality_optimized` models,
168
+ and cannot be combined with `model_type: 'latency_optimized'`.
156
169
 
157
170
  The following parameters will be automatically converted:
158
171
 
@@ -169,6 +182,7 @@ The following parameters will be automatically converted:
169
182
  | `style_id` | No conversion applied
170
183
  | `style_rule` | No conversion applied (can be a string ID or a StyleRule object)
171
184
  | `context` | No conversion applied
185
+ | `custom_instructions` | No conversion applied
172
186
  | `extra_body_parameters` | Hash of extra parameters to pass in the body of the HTTP request. Can be used to access beta features, or to override built-in parameters for testing purposes. Extra parameters can override keys explicitly set by the client.
173
187
 
174
188
  ### Rephrase Text
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deepl-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DeepL SE