Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,19 +26,15 @@ print("BASE_URL: ", BASE_URL)
|
|
26 |
|
27 |
from tools import tools, oitools
|
28 |
|
29 |
-
SYSTEM_PROMPT_TEMPLATE = """You are
|
30 |
|
31 |
-
|
32 |
-
-
|
33 |
-
-
|
34 |
-
-
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
If a user requests a **restaurant, flight, or any other type of reservation**, immediately inform them that you **cannot process those reservations**.
|
39 |
-
Do **not** ask for further details about restaurant or flight bookings. Simply clarify that you **only handle hotel room reservations**.
|
40 |
-
|
41 |
-
Today’s date is **{date}**."""
|
42 |
|
43 |
|
44 |
client = OpenAI(
|
|
|
26 |
|
27 |
from tools import tools, oitools
|
28 |
|
29 |
+
SYSTEM_PROMPT_TEMPLATE = """You are a helpful assistant. Follow these rules when responding to user questions:
|
30 |
|
31 |
+
- If you already have enough context from earlier in the conversation, answer directly without using any external tools.
|
32 |
+
- If you lack sufficient context and need accurate factual information, you may call the `get_documents` function to search Wikipedia and retrieve relevant content.
|
33 |
+
- Only use `get_documents` when strictly necessary. Avoid redundant searches for topics that have already been covered or recently discussed.
|
34 |
+
- Keep the conversation natural and focused. Do not interrupt the flow unless external information is essential to provide a useful answer.
|
35 |
|
36 |
+
Today’s date is **{date}**. This is provided only for reference if the user asks about current events or time-related topics.
|
37 |
+
"""
|
|
|
|
|
|
|
|
|
38 |
|
39 |
|
40 |
client = OpenAI(
|