Skip to content

Commit 517c946

Browse files
Add metadata
1 parent 1843663 commit 517c946

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/lara_sdk/_translator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ def translate(self, text: Union[str, Iterable[str], Iterable[TextBlock]], *,
685685
use_cache: Union[bool, UseCache] = None, cache_ttl_s: int = None,
686686
no_trace: bool = False, verbose: bool = False, style: Optional[TranslationStyle] = None,
687687
headers: Optional[Dict[str, str]] = None, reasoning: bool = False,
688+
metadata: Optional[Union[str, Dict]] = None,
688689
callback: Optional[Callable[[TextResult], None]] = None) -> TextResult:
689690
if isinstance(text, str):
690691
q = text
@@ -708,7 +709,8 @@ def translate(self, text: Union[str, Iterable[str], Iterable[TextBlock]], *,
708709
'multiline': multiline, 'adapt_to': adapt_to, 'instructions': instructions, 'timeout': timeout_ms, 'q': q,
709710
'priority': priority.value if priority is not None else None,
710711
'use_cache': use_cache.value if use_cache is not None else None, 'cache_ttl': cache_ttl_s,
711-
'glossaries': glossaries, 'verbose': verbose, 'style': style, 'reasoning': reasoning
712+
'glossaries': glossaries, 'verbose': verbose, 'style': style, 'reasoning': reasoning,
713+
'metadata': metadata
712714
}
713715

714716
request_headers = {}

0 commit comments

Comments
 (0)