(s)
| 63 | return chat |
| 64 | |
| 65 | def match_code(s): |
| 66 | pattern = r'```python(.*?)```' |
| 67 | sol = re.findall(pattern, s, re.DOTALL) |
| 68 | if len(sol) > 0: |
| 69 | for code_block in reversed(sol): |
| 70 | if 'def ' in code_block: |
| 71 | return code_block |
| 72 | return sol[-1] |
| 73 | |
| 74 | pattern = r'```(.*?)```' |
| 75 | sol = re.findall(pattern, s, re.DOTALL) |
| 76 | if len(sol) > 0: |
| 77 | for code_block in reversed(sol): |
| 78 | if 'def ' in code_block: |
| 79 | return code_block |
| 80 | return sol[-1] |
| 81 | |
| 82 | return s.split('```')[0] |
| 83 | |
| 84 | def generate_sample_batch(question_list): |
| 85 | llm = LLM( |
no outgoing calls
no test coverage detected