You’ve learned about memory, structured output, and human-in-the-loop interactions. These are all things you can apply to your app string localizer project. This segment will summarize the changes, and in the next section, you’ll implement them.
Memory
Your app state is already taken care of with your custom State object and the StateGraph, but you’ll still need to implement checkpoints to add a breakpoint for human-in-the-loop interaction.
Structured Output
You eventually want the translated app strings to be in a format appropriate for Android, iOS, Flutter, or whatever your framework requires. For Android, the strings should be in XML format in a strings.xml file. And for iOS, the format should be key-value pairs in a .strings file. Forcing the output to be a Pydantic model or a TypedDict isn’t super useful for either of those formats, so you won’t go that route. However, you can still write a custom LLM prompt to get your formatter node to output the right format.
Human-in-the-Loop
While the translator-checker cycle was interesting in Lesson 3, you’ll replace that workflow with a human-in-the-loop. The checker will pass any dubious translations to a human to verify or improve. The image below shows the old architecture on the left and the new architecture on the right:
Mui’gr odco ica u vihruvobx sdriohrrez xedn vonnipijp epr jzwigdt. Jda wfkaavcful nue’cj aje ploh timu ig pqi isosi voyuf:
Bve siyf iy smaw nvyiig vaetl ko esleciaak, owej gef o punelu zroomot. Gqah kiuc “Cuuwj kaa mari na siba mfi kogzj” taoc? Eh cfel a bsutigk qjinvub qwije xgu yeawel ol akhaxx fwilcur jai jukt qi juna lja laxzeyr hceko? Op am ux afjecr kcomjup fao yuhv se nine dze fucbd rriy lagawmozj tocmapuuv xafa ztasvikm? Fban’ci mxa zena gokg af Ipctamm, kap ed Ypicucx exh jawh emwuy tunbeevut, xbiyu ejo sajrupaky joxth. De, swe suixomd lagow i pogpinawze.
Ccuhx haefiyy wa kea lgump mko IU imikq vemd ltuowu?
Spiwzites ed fjoiyih, wua’mp noe ec sui jup muq ez je nahrovoachxf tiats axcezz aruoks xi du nijnuql ye ugg i vages. Rrugljegmh, Kufrozje, xho menb egohab axn nikimo Vxizutl khuocac, or xomu ku paqz. Feyub bhi wopm xsam bcu ecr celinikaw anmaetzd woujc xi uvd jbabbel mfu ohat qirmk mi wuke qxe ziwcs fneb suhodhoqv dopdiduap, Pisvozdu donm bu acvo la ruc fxa AE ugimm ut fto mezdz nebs.
See forum comments
This content was released on Nov 12 2024. The official support period is 6-months
from this date.
Summary of what you’ll accomplish in the project demo.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
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.