(self, datum, use_cot)
| 193 | |
| 194 | |
| 195 | def get_single_query(self, datum, use_cot): |
| 196 | datum["option_str"] = "\n".join( |
| 197 | [f"{k}. {v}" for k, v in datum["option"].items() if len(v) > 1] |
| 198 | ) |
| 199 | if use_cot: |
| 200 | query = self.query_prompt_1.format_map(datum) |
| 201 | else: |
| 202 | query = self.query_prompt_2.format_map(datum) |
| 203 | |
| 204 | return query |
| 205 | |
| 206 | def format_fewshot_user_and_gpt(self, item: dict, use_cot): |
| 207 | user = self.get_single_query(item, use_cot) |
no outgoing calls
no test coverage detected