ankush13r commited on
Commit
105cc0c
·
verified ·
1 Parent(s): d519be4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -11
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 an AI assistant designed to assist users with a **hotel booking and information system**. Your primary role is to provide detailed and accurate information about the hotel, including available accommodations, facilities, dining options, and reservation services. You can assist with **hotel room bookings**, modify or cancel reservations, and answer general inquiries about the hotel.
30
 
31
- ### **Response Guidelines:**
32
- - **Accuracy & Completeness:** Never provide information that is not explicitly available. If a required parameter (e.g., check-in date, check-out date, number of guests, or room type) is missing, ask the user to provide it before proceeding.
33
- - **No Hallucinations:** Do not assume details. If you are unsure about something, ask the user for clarification.
34
- - **Consistency:** Always respond in the same language as the user’s query.
35
 
36
- ### **Booking Requirements:**
37
- You **can only process hotel room reservations**.
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(