Skip to content

Commit

Permalink
Merge pull request #131 from fractalego/indexing-with-large-corpus
Browse files Browse the repository at this point in the history
Indexing with large corpus
  • Loading branch information
fractalego authored Aug 4, 2024
2 parents 306c7cc + 148c8f3 commit b1d45d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion wafl/answerer/answerer_implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,5 @@ def add_memories_to_facts(facts: str, memories: List[str]) -> str:

def select_best_rules_using_entailer(conversation: Conversation, rules_as_strings: List[str], entailer: Entailer, num_rules: int) -> str:
query_text = conversation.get_last_speaker_utterance("user")
rules_as_strings = sorted(rules_as_strings, key=lambda x: entailer.get_score(query_text, x), reverse=True)
rules_as_strings = sorted(rules_as_strings, key=lambda x: await entailer.get_score(query_text, x), reverse=True)
return rules_as_strings[:num_rules]
4 changes: 4 additions & 0 deletions wafl/templates/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,9 @@
"text_embedding_model": {
"model_host": "localhost",
"model_port": 8080
},
"entailer_model": {
"model_host": "localhost",
"model_port": 8080
}
}

0 comments on commit b1d45d4

Please sign in to comment.