Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def parse_tool_for_minicpm3(
return tool_calls
else:
return []
except:
except Exception:
return []

if __name__ == "__main__":
Expand Down
12 changes: 6 additions & 6 deletions AgentCPM-Report/servers/custom/src/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def evisrag_output_extract_from_special(ans_ls: List[str]) -> Dict[str, List[str
def extract(ans: str) -> str:
try:
content = ans.split('<answer>')[1].split('</answer>')[0].strip()
except:
except Exception:
content = ans.strip()
return content

Expand Down Expand Up @@ -541,7 +541,7 @@ def _surveycpm_print_tasknote_hire(current_survey, last_detail=False):
try:
content = _surveycpm_abbr_one_line(current_survey["title"], abbr=False)
string += f"# Title: {content}\n\n"
except:
except Exception:
string += f"# Title: None\n\n"

# sections
Expand Down Expand Up @@ -706,7 +706,7 @@ def surveycpm_parse_response(
hard_mode=hard_mode, # You can use hard mode for better performance
**kwargs
)
except:
except Exception:
action_is_valid = False
action = {}
else:
Expand Down Expand Up @@ -811,7 +811,7 @@ def surveycpm_validate_action(
section_node = surveycpm_get_position(current_survey, action["position"], tag="outline")
if "subsections" in section_node:
return False
except:
except Exception:
return False

for sec in action["subsections"]:
Expand Down Expand Up @@ -848,7 +848,7 @@ def surveycpm_validate_action(
assert action["content"].count("\\cite") <= 12
assert "\\cite" in action["content"]

except:
except Exception:
return False

return True
Expand Down Expand Up @@ -1485,7 +1485,7 @@ def extract_num_from_textid(textid):
try:
if textid.startswith("textid"):
return int(textid.split("textid")[-1].strip())
except:
except Exception:
return None
return None
def replace_bibkey(match): # \\cite{textid2, textid1} -> [1,2]
Expand Down