mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-06 08:16:00 +00:00
bugfix
This commit is contained in:
parent
34b16ab1b1
commit
e8d7e093f7
2 changed files with 7 additions and 2 deletions
|
|
@ -291,7 +291,7 @@ class StepContextGenerator(BaseContextGenerator, PromptMixin):
|
|||
return [int(num) for num in numbers]
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error parsing rerank response: {e}")
|
||||
logger.exception(f"Error parsing rerank response: {e}")
|
||||
return []
|
||||
|
||||
def _format_experiences_for_context(self, experiences: List[VectorStoreNode]) -> str:
|
||||
|
|
|
|||
|
|
@ -362,7 +362,12 @@ class StepSummarizer(BaseSummarizer, PromptMixin):
|
|||
# Parse validation result
|
||||
is_valid = "valid" in response_content.lower() and "invalid" not in response_content.lower()
|
||||
score_match = re.search(r'score[:\s]*([0-9.]+)', response_content.lower())
|
||||
score = float(score_match.group(1)) if score_match else 0.5
|
||||
|
||||
# add by jinli 0620
|
||||
try:
|
||||
score = float(score_match.group(1)) if score_match else 0.5
|
||||
except Exception:
|
||||
score = -1
|
||||
|
||||
return {
|
||||
"is_valid": is_valid and score > 0.3,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue