Update README.md
Browse files
README.md
CHANGED
@@ -143,8 +143,8 @@ message = [
|
|
143 |
'role': 'user'
|
144 |
}
|
145 |
]
|
146 |
-
|
147 |
-
|
148 |
```
|
149 |
|
150 |
```output
|
@@ -220,12 +220,17 @@ Conversation Start here:
|
|
220 |
|
221 |
To continue the conversation,
|
222 |
```python
|
223 |
-
message
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
|
|
|
|
|
|
|
|
|
|
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
|