Browse Source

Update 'README.md'

天问 1 month ago
parent
commit
8418974ef2
1 changed files with 27 additions and 0 deletions
  1. 27 0
      README.md

+ 27 - 0
README.md

@@ -1,2 +1,29 @@
 # autogen
 
+
+## Usage
+
+```
+pip install autogen
+
+
+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()
+
+
+```