Update llm/llm.py
Browse files- llm/llm.py +7 -1
llm/llm.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import yaml
|
2 |
import logging
|
3 |
|
@@ -14,7 +16,11 @@ class LLM_chain:
|
|
14 |
|
15 |
def __read_yaml(self):
|
16 |
try:
|
17 |
-
|
|
|
|
|
|
|
|
|
18 |
data = yaml.safe_load(file)
|
19 |
return data
|
20 |
except Exception as e:
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import yaml
|
4 |
import logging
|
5 |
|
|
|
16 |
|
17 |
def __read_yaml(self):
|
18 |
try:
|
19 |
+
# get current dir
|
20 |
+
current_dir = os.path.dirname(os.path.realpath(__file__))
|
21 |
+
yaml_file = os.path.join(current_dir, 'prompts.yaml')
|
22 |
+
|
23 |
+
with open(yaml_file, 'r') as file:
|
24 |
data = yaml.safe_load(file)
|
25 |
return data
|
26 |
except Exception as e:
|