文章预览
作者:郭才高,Datawhale创作者 1. Translation Agent复现效果展示 #执行任务 # 调用编译后的工作流,传入初始状态字典 result = app.invoke({ "source_lang" : "English" , # 源语言为英语 "target_lang" : "中文" , # 目标语言为中文 "source_text" : """By using an LLM as the heart of the translation engine, this system is highly steerable. For example, by changing the prompts, it is easier using this workflow than a traditional machine translation (MT) system to: Modify the output's style, such as formal/informal. Specify how to handle idioms and special terms like names, technical terms, and acronyms. For example, including a glossary in the prompt lets you make sure particular terms (such as open source, H100 or GPU) are translated consistently. Specify specific regional use of the language, or specific dialects, to serve a target audience. For example, Spanish spoken in Latin America is different from Span
………………………………