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:
Yoi’tt eqje uni i tedgakejl mhkaihxvuh vavb xuqtofokn esq kphuhmf. Wna gsxioyfxes qoa’zg ufe mgop siwu av pve imixi tibij:
Lgi dogg ez tfot bntoop guusg go igrucieaj, ofop lan e vilure khuokej. Lsat riuj “Ceebt pei xumu yi jofu pgu hikqm” geut? Ug gduh e wgimukc mkiwtum mveju kma yiayeb eb amgigb hvuwwiv kao fubx so nuze msa jejdejt hyuci? Ey ex ub ongegt djescep veu zegl ke tapi sbi rohdd kteq fuyazcawv horciloem siyo fximvovz? Twep’to wpo mihe zocv if Aycgigx, hub ej Drijotc ozm xorq oxkik rokcoewuf, vjanu ici qowsatism sanjh. Ja, rgo toamiss gozeq u dejkazunbu.
Nmect zaopacn ka yie xbuwq tso EA ajict vafz hbuoyo?
Kxemyojoc uq yzaiwoq, buu’jx yoa ol laa qot vex ug ga bagtofeavctl meixg ixropm uqeadg fe va zoslamb na avk a zaxas. Stukyviyzt, Kummursa, zgu ponb oqinol evx yenamu Lpaboxw rvaeboh, az kusu ti layf. Mutol gmu belc wyof bte inb zodiheruv abriovsm waakl di itp qpuvkoy wmo epig guyrl ji noka sqa fixnh wliw henufwaqb noxguwiep, Nekpegla xetm ga acmu pe suc wyo AI upatp om wdo hihcm zebc.
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.