mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-11 15:15:18 +02:00
feature: add a new role tutorial assistant
This commit is contained in:
parent
de1a7dcfc7
commit
414dea3ea6
5 changed files with 275 additions and 0 deletions
20
examples/write_tutorial.py
Normal file
20
examples/write_tutorial.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env python3
|
||||
# _*_ coding: utf-8 _*_
|
||||
"""
|
||||
@Time : 2023/9/4 21:40:57
|
||||
@Author : Stitch-z
|
||||
@File : tutorial_assistant.py
|
||||
"""
|
||||
import asyncio
|
||||
|
||||
from metagpt.roles.tutorial_assistant import TutorialAssistant
|
||||
|
||||
|
||||
async def main():
|
||||
topic = "Write a tutorial about MySQL"
|
||||
role = TutorialAssistant(language="Chinese")
|
||||
await role.run(topic)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(main())
|
||||
Loading…
Add table
Add a link
Reference in a new issue