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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +14 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eac62f1d4905c35c5e4555195f6a913dec6eb9ac3c739f4086ad39b127995843
|
|
4
|
+
data.tar.gz: d9cfb63f11fc42bc7301f0316ec8f2707b06ce8d073e28c012ef5042119ff34b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|