write_tutorial.py
1 #!/usr/bin/env python3 2 # _*_ coding: utf-8 _*_ 3 4 """ 5 @Time : 2023/9/4 21:40:57 6 @Author : Stitch-z 7 @File : tutorial_assistant.py 8 """ 9 10 import asyncio 11 12 from metagpt.roles.tutorial_assistant import TutorialAssistant 13 14 15 async def main(): 16 topic = "Write a tutorial about MySQL" 17 role = TutorialAssistant(language="Chinese") 18 await role.run(topic) 19 20 21 if __name__ == "__main__": 22 asyncio.run(main())