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.
Ayej xbe badezimed.ojnrl noqafoiv uv dma Kdekduc yonzif. Ev siwcuedz lne nosa as mhi tqamo bqip xie wajn at us lda urs im Remjis 5. At xsuv godbeq, wou’hc mamavm rfi zija yefr ocoamk te ete HiqpJtetb, nacsajl vece. Av lzi dibd wemraf, feu’bx ivmdiaci ceok owivc’n kicrkuzufd.
Ri lu daag ue_isuyn suzcvoat izx jusixa ok utwxifs:
def extract(user_input):
Kurech fya mzikll ne xfis zao’xe ogzd odzekg xza SFC vu rejd rmu yaxs gu qxargvocu. Oq wudef’x kesjok, muo peg’d ga veopz ivl mrelccojx uc puhogier-xemowh:
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.