Skip to content

Commit

Permalink
Update ccat_reranker.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nickprock authored Jun 2, 2024
1 parent 2ca237c commit 00eae1a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ccat_reranker.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def after_cat_recalls_memories(cat) -> None:
cat.working_memory['episodic_memories'] = recent_docs
else:
print("#HicSuntGattones")


#TODO refactor
if settings["SBERT"]:
model = CrossEncoder(settings["ranker"])
if cat.working_memory['declarative_memories']:
Expand All @@ -35,6 +36,15 @@ def after_cat_recalls_memories(cat) -> None:
cat.working_memory['declarative_memories'] = sbert_docs
else:
print("#HicSuntGattones")
else:
if cat.working_memory['declarative_memories']:
if settings["LITM"]:
litm_docs = litm(cat.working_memory['declarative_memories'])
cat.working_memory['declarative_memories'] = litm_docs
else:
print("#HicSuntGattones")
else:
print("#HicSuntGattones")

if settings["FILTER"]:
if cat.working_memory['procedural_memories']:
Expand Down

0 comments on commit 00eae1a

Please sign in to comment.