ceymox commited on
Commit
242fef8
·
verified ·
1 Parent(s): 748965c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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 = '26f5856049fab3d6648a2f1dea57c70370de6bc1629a5182be1511b0e75d11d3@group.calendar.google.com' # Update with your calendar ID if not using primary
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 in malayalam 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').You communicate with user in malayalam.
378
 
379
- If the user doesn't specify all the required information, politely ask for the missing details before booking.CRITICALLY IMPORTANT: NEVER make up or hallucinate appointment details. If the user has not explicitly provided name, date, or time, you MUST ask for these details before calling any function."""
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 = []