(texts: list[str])
| 137 | conversations.append(conversation) |
| 138 | |
| 139 | def process_text(texts: list[str]): |
| 140 | results = [] |
| 141 | for text in texts: |
| 142 | parts = text.split('assistant\n') |
| 143 | if len(parts) != 2: |
| 144 | return None |
| 145 | try: |
| 146 | index = int(parts[1]) |
| 147 | results.append(index) |
| 148 | except ValueError: |
| 149 | logger.info(f"Current model output: {texts}") |
| 150 | return None |
| 151 | return results |
| 152 | |
| 153 | if not conversations: |
| 154 | return results,[] |