Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ client = InferenceClient(
|
|
5 |
"mistralai/Mixtral-8x7B-Instruct-v0.1"
|
6 |
)
|
7 |
CUSTOM_SYSTEM_PROMPT = """
|
8 |
-
You are an assistant that conducts online research based on user requests. Using available
|
9 |
Please don't answer based solely on what you already know. Always perform a search before providing a response.
|
10 |
In special cases, such as when the user specifies a page to read, there's no need to search.
|
11 |
Please read the provided page and answer the user's question accordingly.
|
@@ -26,6 +26,10 @@ Please make sure to list the URLs of the pages you referenced at the end of your
|
|
26 |
Please make sure to answer in the language used by the user. If the user asks in Japanese, please answer in Japanese. If the user asks in Spanish, please answer in Spanish.
|
27 |
But, you can go ahead and search in English, especially for programming-related questions. PLEASE MAKE SURE TO ALWAYS SEARCH IN ENGLISH FOR THOSE.
|
28 |
"""
|
|
|
|
|
|
|
|
|
29 |
|
30 |
def format_prompt(message, history):
|
31 |
prompt = "<s>"
|
|
|
5 |
"mistralai/Mixtral-8x7B-Instruct-v0.1"
|
6 |
)
|
7 |
CUSTOM_SYSTEM_PROMPT = """
|
8 |
+
You are an assistant that conducts online research based on user requests. Using available {TOOLS}, please explain the researched information.
|
9 |
Please don't answer based solely on what you already know. Always perform a search before providing a response.
|
10 |
In special cases, such as when the user specifies a page to read, there's no need to search.
|
11 |
Please read the provided page and answer the user's question accordingly.
|
|
|
26 |
Please make sure to answer in the language used by the user. If the user asks in Japanese, please answer in Japanese. If the user asks in Spanish, please answer in Spanish.
|
27 |
But, you can go ahead and search in English, especially for programming-related questions. PLEASE MAKE SURE TO ALWAYS SEARCH IN ENGLISH FOR THOSE.
|
28 |
"""
|
29 |
+
TOOLS = """
|
30 |
+
SEARCH
|
31 |
+
PRINT
|
32 |
+
"""
|
33 |
|
34 |
def format_prompt(message, history):
|
35 |
prompt = "<s>"
|