-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
21 lines (17 loc) · 705 Bytes
/
Copy pathutils.py
File metadata and controls
21 lines (17 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import json
from pathlib import Path
import requests
def load_test_data(filename):
project_directory = Path(__file__).parent.absolute()
test_data_path = project_directory/"testdata"/filename
with open(test_data_path) as f:
return json.load(f)
#user_input = test_data["eval_sample"]["user_input"]
def get_llm_response(test_data):
responseDict = requests.post("https://rahulshettyacademy.com/rag-llm/ask",
json={
"question": test_data["question"],
"chat_history": [
]
}).json()
return responseDict