(response)
| 52 | return res_id |
| 53 | |
| 54 | def extract_res(response): |
| 55 | if "[BOT]" in response: |
| 56 | response = response.split("[BOT]")[1] |
| 57 | if "<s>" in response: |
| 58 | response = response.split("<s>")[-1] |
| 59 | if "</s>" in response: |
| 60 | response = response.split("</s>")[0] |
| 61 | if "[SEP]" in response: |
| 62 | response = response.split("[SEP]")[0] |
| 63 | return response[1:] |
| 64 | |
| 65 | |
| 66 |