mjbuehler commited on
Commit
fc774f1
1 Parent(s): d6cca84

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md CHANGED
@@ -80,4 +80,16 @@ res,_= generate_response (text_input = "What is collagen?", system_prompt = 'You
80
 
81
  )
82
  print (res[0])
 
 
 
 
 
 
 
 
 
 
 
 
83
  ```
 
80
 
81
  )
82
  print (res[0])
83
+ ```
84
+ To realize multi-turn interactions, see this example:
85
+ ```
86
+ res, messages = generate_response (text_input="What is spider silk?", messages=[])
87
+ messages.append ({"role": "assistant", "content": res[0]}, ) #append result to messages dict
88
+ print (res)
89
+ res, messages = generate_response (text_input="Explain this result in detail.", messages=messages)
90
+ messages.append ({"role": "assistant", "content": res[0]}, ) #append result to messages dict
91
+ print (res)
92
+ res, messages = generate_response (text_input="Provide this in JSON format.", messages=messages)
93
+ messages.append ({"role": "assistant", "content": res[0]}) #append result to messages dict
94
+ print (res)
95
  ```