File size: 391 Bytes
c456b80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from app.services.llm_service import call_gpt

def refactor_node(state):
    response = call_gpt(
        "Fix and improve code based on review.",
        f"""

        Code:

        {state['code']}



        Review:

        {state['review']}

        """,
        temperature=0.2
    )

    return {
        "code": response,
        "iteration": state["iteration"] + 1
    }