AashitaK commited on
Commit
072aa91
·
verified ·
1 Parent(s): 0156967

Update utils/chatbot.py

Browse files
Files changed (1) hide show
  1. utils/chatbot.py +6 -1
utils/chatbot.py CHANGED
@@ -6,7 +6,12 @@ from utils.document_retrieval import select_document_section_by_query_similarity
6
  from utils.file_utils import load_file
7
 
8
  # Load the prompt from a file
9
- file_path = os.path.join('..', 'data', 'meta_prompt.txt')
 
 
 
 
 
10
  META_PROMPT = load_file(file_path)
11
 
12
  def construct_prompt(query: str, context_embeddings: dict, df: pd.DataFrame) -> tuple[str, str]:
 
6
  from utils.file_utils import load_file
7
 
8
  # Load the prompt from a file
9
+ # Get the absolute path of the current script
10
+ current_script_dir = os.path.dirname(os.path.abspath(__file__))
11
+
12
+ # Construct the absolute path to the "meta_prompt.txt" file
13
+ file_path = os.path.join(current_script_dir, '..', 'data', 'meta_prompt.txt')
14
+
15
  META_PROMPT = load_file(file_path)
16
 
17
  def construct_prompt(query: str, context_embeddings: dict, df: pd.DataFrame) -> tuple[str, str]: