Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rdagent/oai/backend/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def _create_chat_completion_auto_continue(

all_response = ""
new_messages = deepcopy(messages)
for _ in range(3):
for _ in range(6): # for some long code, 3 times may not enough for reasoning models
if "json_mode" in kwargs:
del kwargs["json_mode"]
response, finish_reason = self._create_chat_completion_add_json_in_prompt(
Expand Down
5 changes: 4 additions & 1 deletion rdagent/scenarios/data_science/proposal/exp_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,10 @@ def _f(user_prompt):
user_prompt=user_prompt,
system_prompt=system_prompt,
json_mode=True,
json_target_type=dict[str, dict[str, str] | str], # workflow_update may be a string
# NOTE: corner cases.
# workflow_update may be a string
# model could have 2 level nested dict.
json_target_type=dict[str, dict[str, str | dict] | str],
)
)
assert "hypothesis_proposal" in resp_dict, "Hypothesis proposal not provided."
Expand Down