Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -122,14 +122,14 @@ def extract_question_list(llm, query):
|
|
| 122 |
sys_prompt = """You are an AI assistant that determines if multiple questions are stacked in a single question and split the question into sub questions and return a list of them. Make sure the response is a valid Python list.
|
| 123 |
If the question is a single question and return the original question."""
|
| 124 |
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
)
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
output = llm.invoke(
|
| 133 |
pred = output.content
|
| 134 |
|
| 135 |
try:
|
|
|
|
| 122 |
sys_prompt = """You are an AI assistant that determines if multiple questions are stacked in a single question and split the question into sub questions and return a list of them. Make sure the response is a valid Python list.
|
| 123 |
If the question is a single question and return the original question."""
|
| 124 |
|
| 125 |
+
messages = [
|
| 126 |
+
(
|
| 127 |
+
"system",
|
| 128 |
+
sys_prompt,
|
| 129 |
+
),
|
| 130 |
+
("human", query),
|
| 131 |
+
]
|
| 132 |
+
output = llm.invoke(messages)
|
| 133 |
pred = output.content
|
| 134 |
|
| 135 |
try:
|