File size: 453 Bytes
02c783d |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from agents.Base import BaseAgent
from utils.utils import clear_code
class DirectPrompt(BaseAgent):
def run_single_pass(self, mem, verbose=False):
text = mem.ps.instruction
text += "Please output the codes only without explanation, which we can run directly."
msg = [
{"role": "user", "content": text},
]
response = self.model.generate(msg)
mem.ps.solution = clear_code(response)
|