Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ MODEL_ID = "meta-llama/Meta-Llama-3.1-8B-Instruct"
|
|
30 |
# Google Calendar API Configuration
|
31 |
SCOPES = ['https://www.googleapis.com/auth/calendar']
|
32 |
SERVICE_ACCOUNT_FILE = 'service-account-key.json'
|
33 |
-
CALENDAR_ID = '
|
34 |
|
35 |
# Local appointments database (for backup)
|
36 |
appointments_db = {}
|
@@ -372,11 +372,11 @@ def process_chat(message, chat_history):
|
|
372 |
|
373 |
try:
|
374 |
# Create system prompt
|
375 |
-
system_prompt = """You are a friendly appointment booking assistant. You help users book appointments
|
376 |
|
377 |
-
Be polite and helpful. For any appointment request, make sure to collect the person's name, date (in YYYY-MM-DD format), and time (e.g., '10:00 AM').
|
378 |
|
379 |
-
If the user doesn't specify all the required information, politely ask for the missing details before booking.
|
380 |
|
381 |
# Convert Gradio chat history to message format
|
382 |
messages = []
|
|
|
30 |
# Google Calendar API Configuration
|
31 |
SCOPES = ['https://www.googleapis.com/auth/calendar']
|
32 |
SERVICE_ACCOUNT_FILE = 'service-account-key.json'
|
33 |
+
CALENDAR_ID = 'primary' # Update with your calendar ID if not using primary
|
34 |
|
35 |
# Local appointments database (for backup)
|
36 |
appointments_db = {}
|
|
|
372 |
|
373 |
try:
|
374 |
# Create system prompt
|
375 |
+
system_prompt = """You are a friendly appointment booking assistant. You help users book appointments by collecting their name, preferred date, and time.
|
376 |
|
377 |
+
Be polite and helpful. For any appointment request, make sure to collect the person's name, date (in YYYY-MM-DD format), and time (e.g., '10:00 AM').
|
378 |
|
379 |
+
If the user doesn't specify all the required information, politely ask for the missing details before booking."""
|
380 |
|
381 |
# Convert Gradio chat history to message format
|
382 |
messages = []
|