Skip to content

Instantly share code, notes, and snippets.

@karljuhlpep
karljuhlpep / dspy_codegen.py
Last active June 14, 2024 02:16
DSPy Module - CodeGen + Debugging
import subprocess
import dspy
### Note this code is not tested, and likely includes errors that need to be refined.
class IterativeCodeRefinement(dspy.Module):
def __init__(self):
super().__init__()
self.generate_pseudocode = dspy.ChainOfThought("task -> pseudocode")