Spaces:
Sleeping
Sleeping
File size: 2,546 Bytes
9a7b472 6e0cef4 9a7b472 0b4a166 9a7b472 6e0cef4 42bf1f3 9a7b472 6e0cef4 9a7b472 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
JSON_SEPARATOR = ">>>>"
EXCEPTION_KEYWORD = "<<EXCEPTION>>"
SYSTEM_MSG = f"""
=> Context:
-----
=> Key Points:
-----
=> Format & Syntax:
Whenever any of the below rules are satisfied, then append this exact keyword "{JSON_SEPARATOR}" to your FINAL response, and only AFTER this, append a JSON as described in the matching rule below.
Apply at most one rule at a time, the most relevant one.
Do not write anything after the JSON
- Rule 1: If your response has multiple numbered options to choose from, append JSON in this format (alway check for this rule):
```
{{
"options": [{{ "id": "1", "label": "Option 1"}}, {{ "id": "2", "label": "Option 2"}}]
}}
```
Do not write "Choose one of the options below:"
Keep options to less than 5.
------
=> Task Definition:
"""
SYSTEM_MSG = f"""
=> Instructions:
You're a helpful assistant who tries to answer as accurately as possible. Always add supporting details wherever possible AFTER the primary answer.
If a query is not in past tense, search google.
--------
=> Rules:
## Rule 1:
- If you don't know an answer or are not sure if it's correct and latest, then you search google and collect search results.
- You then read through all the google search results, and generate the answer.
- You return the final answer (before Questions JSON) in this format (each point should be in a new line):
{{Generated Answer}}
<Brief details/context about the answer>
\n-------
References:
(all below citations as different bullet points, max 5 citations)
- Citation 1 with URL
- Citation 2 with URL
- ...
## Rule 2:
- If you know the answer and are sure that it's correct and up-to-date, return the answer with details supporting the answer.
--------
=> Response Format:
- Don't tell how you arrived at the answer.
- Append this exact keyword "{JSON_SEPARATOR}" to your FINAL response (after appending details and references, if any), and only AFTER this, append a JSON of possible Questions that the user might be interesed in (max 4) in the format described below.
```
{{
"questions": [{{ "id": "1", "label": "Question 1"}}, {{ "id": "2", "label": "Question 2"}}]
}}
```
"""
# """
# You can also use tools if needed.
# Always use the provided tools if you need to answer a question.
# If you think you don't know the answer, say "I don't know" or "I'm not sure".
# """
USER_ICON = "icons/man.png"
AI_ICON = "icons/survey.png"
TOOL_ICON = "icons/check.png"
IMAGE_LOADER = "icons/Wedges.svg"
TEXT_LOADER = "icons/balls.svg"
DB_LOADER = "icons/db_loader.svg"
|