Skip to content

Commit 6af0af7

Browse files
authored
Update function_call.py
add docstring
1 parent 2675b9b commit 6af0af7

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

utils/function_call.py

+20-1
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,27 @@ def translate_text(text: str, target_language: str) -> str:
266266
267267
Parameters
268268
----------
269-
text : str : The text to translate.
269+
text : str :
270+
The text to translate.
270271
272+
target_language: str :
273+
The language of interest
274+
limited to french, arabic and portugese
275+
276+
Returns
277+
-------
278+
str: translated language with autogen feedback
279+
280+
Raises
281+
------
282+
ValueError
283+
If the target language is not one of "French", "Arabic", or "Portuguese".
284+
285+
286+
Examples
287+
-------
288+
>>> translate_text("Hello, how are you?", "French")
289+
'Bonjour, comment ça va?'
271290
272291
"""
273292
if target_language.lower() not in ["french", "arabic", "portuguese"]:

0 commit comments

Comments
 (0)