Skip to content

Commit 08ed74d

Browse files
Fix boolean use_cache
1 parent 4c12ff1 commit 08ed74d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/lara_sdk/_translator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ def translate(self, text: Union[str, Iterable[str], Iterable[TextBlock]], *,
191191
else:
192192
raise ValueError('text must be a string or an iterable')
193193

194+
if use_cache is True:
195+
use_cache = UseCache.YES
196+
elif use_cache is False:
197+
use_cache = UseCache.NO
198+
194199
return TextResult(**self._client.post('/translate', {
195200
'source': source, 'target': target, 'source_hint': source_hint, 'content_type': content_type,
196201
'multiline': multiline, 'adapt_to': adapt_to, 'instructions': instructions, 'timeout': timeout_ms, 'q': q,

0 commit comments

Comments
 (0)