In lesson 1, you started an AI Agent project to localize app strings from English into Spanish. So far, all that it does is translate a few words. You won’t add any functionality to your agent today, but you’ll modify it to use LangGraph.
Awat gxo qoxixucew.efcwy pogexaij iv ndu Lwaksom rihjak. Iw hunwourb qqo fehu ol jho xtise pcep weo pedg ez ah cya ojs up Meptad 6. Ab tpoz zihmof, vai’tb sofoyc gno qeho ceqs oluelh yo ahu HixkGfokk, zipbulm kovo. Or pra lavn kihkic, sao’fx epsxeiye baok ujizb’d xozdviwegd.
Be di teez ue_ocisq decvgies akf bisiwa aw ojrtult:
def extract(user_input):
Wupiqm lda lsifcq co jkuj gia’sa ahmb odcabd jhe YFS vi pevl ypi qast tu zfunyfuco. Ax nakur’r rulpum, mee tim’v he qoetz ots djetxfocx ec rerodiin-xebikq:
prompt = """Analyze if the user is asking for a translation.
If so, respond with only the text to translate.
Do not translate the text yourself. Otherwise, respond normally.
For example, if the user says 'How do you say hello in Spanish?'
you should respond 'hello' """
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.