Skip to content

Commit

Permalink
Merge branch 'production' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaskoepf committed Feb 20, 2023
2 parents ee04963 + aad7115 commit c4bcd2a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/oasst_backend/tree_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,9 @@ async def handle_interaction(self, interaction: protocol_schema.AnyInteraction)
f"Initial prompt message was accepted: {msg.id=}, {acceptance_score=}, {len(reviews)=}"
)
else:
msg.review_result = False
self.db.add(msg)
if msg.review_result is None:
msg.review_result = False
self.db.add(msg)
self.enter_low_grade_state(msg.message_tree_id)
self.check_condition_for_prompt_lottery(msg.message_tree_id)
elif msg.review_count >= self.cfg.num_reviews_reply:
Expand All @@ -806,7 +807,7 @@ async def handle_interaction(self, interaction: protocol_schema.AnyInteraction)
logger.info(
f"Reply message message accepted: {msg.id=}, {acceptance_score=}, {len(reviews)=}"
)
else:
elif msg.review_result is None: # do not overwrite existing review result
msg.review_result = False
self.db.add(msg)

Expand Down

0 comments on commit c4bcd2a

Please sign in to comment.