Skip to content

Commit

Permalink
[doc-qa] fix: rename command to "/rag on/off"
Browse files Browse the repository at this point in the history
  • Loading branch information
ifTNT committed Sep 13, 2024
1 parent 29a11ab commit 85ff18c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/executor/docqa/docqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __str__(self):
return self.msg

class DocQaExecutor(LLMExecutor):
cmd_regex = [r"(/(retriever)\s+(on|off))"]
cmd_regex = [r"(/(rag)\s+(on|off))"]

def __init__(self):
super().__init__()
Expand Down Expand Up @@ -212,7 +212,7 @@ async def _failback_to_generator(self, chat_history: [dict], modelfile:Modelfile

def is_rag_session_ended(self, history: [dict], url):
history = history.copy()
cmd_prefix = "retriever"
cmd_prefix = "rag"
session_activated = url is not None
cmds, history = split_cmd_history(history=history, cmd_regex=self.cmd_regex)
cmds = filter(lambda x: x[0] == cmd_prefix, cmds)
Expand Down

0 comments on commit 85ff18c

Please sign in to comment.