Skip to content

Commit

Permalink
clean up and more
Browse files Browse the repository at this point in the history
  • Loading branch information
mahtin committed Nov 26, 2023
1 parent 1eeca98 commit 3e40a69
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/example_ai_translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ def translate_call(cf):
# We also have to deal with a . in a verb - that does not work in Python. So sad.
# Also, the - is actually an _ in this Python library.
# This is not normally needed for other calls
m = cf.accounts.ai.run
m = getattr(m, '@cf')
m = getattr(m, 'meta')
m = getattr(m, 'm2m100_1.2b')
m = cf
for verb in 'accounts/ai/run/@cf/meta/m2m100_1.2b'.split('/'):
m = getattr(m, verb)
return m

def doit(account_name, english_text):
Expand Down

0 comments on commit 3e40a69

Please sign in to comment.