spow12 commited on
Commit
bafb58e
1 Parent(s): bed7de8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -8
README.md CHANGED
@@ -143,8 +143,8 @@ message = [
143
  'role': 'user'
144
  }
145
  ]
146
- out = pipe(message, **generation_configs)
147
- out
148
  ```
149
 
150
  ```output
@@ -220,12 +220,17 @@ Conversation Start here:
220
 
221
  To continue the conversation,
222
  ```python
223
- message.append({
224
- 'role': 'user',
225
- 'content': "ユーザー:うん、今日の仕事はどう?
226
- })
227
- out = pipe(message, **generation_configs)
228
- out
 
 
 
 
 
229
  ```
230
 
231
  ```output
 
143
  'role': 'user'
144
  }
145
  ]
146
+ message = pipe(message, **generation_configs)
147
+ message
148
  ```
149
 
150
  ```output
 
220
 
221
  To continue the conversation,
222
  ```python
223
+ def add_message(message, query, generation_configs):
224
+ message = message[0]['generated_text']
225
+ message.append({
226
+ 'role': 'user',
227
+ 'content': query
228
+ })
229
+ message = pipe(message, **generation_configs)
230
+ return message
231
+ query = """ユーザー: うん、今日の仕事はどう?"""
232
+ message = add_message(message, query, generation_configs)
233
+ message
234
  ```
235
 
236
  ```output