Skip to content

Commit f315559

Browse files
committed
set model via default config instead
1 parent aee5307 commit f315559

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

patchwork/patchflows/PRReview/PRReview.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ def run(self) -> dict:
120120
Ensure that you include all rules in your response, even if there\'s no violation. The output should directly reflect the reasoning in your thinking section.
121121
''',
122122
json_schema={"review": "The markdown text of the reviews"},
123-
model="claude-3-5-sonnet-latest")
123+
**self.inputs
124+
)
124125
).run()
125126

126127
llm2_outputs = SimplifiedLLMOnce(
@@ -136,7 +137,8 @@ def run(self) -> dict:
136137
You should return an empty response if there are no code reviews that is actionable or useful.
137138
''',
138139
json_schema={"review": "The reviews curated"},
139-
model="claude-3-5-sonnet-latest")
140+
**self.inputs
141+
)
140142
).run()
141143

142144
review = llm2_outputs.get("review")

patchwork/patchflows/PRReview/defaults.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# PRReview Inputs
2-
diff_summary: long
3-
diff_suggestion: false
4-
52

63
# ReadPRDiffs Inputs
74
# github_api_key: required-for-github-scm
@@ -14,7 +11,7 @@ diff_suggestion: false
1411
# CallLLM Inputs
1512
# openai_api_key: required-for-chatgpt
1613
# google_api_key: required-for-gemini
17-
# model: gpt-4o
14+
model: gpt-4o-mini
1815
# client_base_url: https://api.openai.com/v1
1916
# Example HF model
2017
# client_base_url: https://api-inference.huggingface.co/models/codellama/CodeLlama-70b-Instruct-hf/v1

patchwork/step.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ def __init__(self, inputs: DataPoint):
7373
self.run = self.__managed_run
7474

7575
def __init_subclass__(cls, input_class: Optional[Type] = None, output_class: Optional[Type] = None, **kwargs):
76-
if cls.__name__ == "PreparePR":
77-
print(1)
7876
input_class = input_class or getattr(cls, "input_class", None)
7977
if input_class is not None and not is_typeddict(input_class):
8078
input_class = None

0 commit comments

Comments
 (0)