微软开源ai框架 pyautogen https://github.com/microsoft/autogen
天问 700c73091d Update 'README.md' | 8 months ago | |
---|---|---|
README.md | 8 months ago |
pip install pyautogen
from autogen import Autogen
autogen = Autogen()
intent_node = autogen.add_intent(name='greet', message='Hello!')
slot_node = autogen.add_slot(name='name', message='Your name?')
data = [
('Hello, how are you?', 'I’m fine, thank you.'),
('What’s your name?', 'My name is Alice.'),
('Nice to meet you, Alice.', 'Nice to meet you too.'),
]
autogen.train(data)
# 添加更多的意图节点和槽位节点
autogen.add_intent(name='ask_weather', message='What’s the weather like today?')
autogen.add_slot(name='location', message='Where?')
autogen.run()