Arafath10 commited on
Commit
f077ece
·
verified ·
1 Parent(s): 3dee1ca

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -3
main.py CHANGED
@@ -63,8 +63,10 @@ async def process_query(query: str):
63
  # Initial message to check for waybill number in the query
64
  messages = [
65
  {"role": "system", "content": "You are a helpful assistant for Curfox delivery system."},
66
- {"role": "user", "content": f"""Check if the waybill/order number is present in the query (e.g., CA000001).
67
- Respond 'done' if present, otherwise prompt the user to provide the number/waybill number (include or response to greetings)."""}
 
 
68
  ]
69
  result = ask_openai(messages)
70
 
@@ -72,7 +74,8 @@ async def process_query(query: str):
72
  # Extract the waybill number
73
  extract_message = [
74
  {"role": "system", "content": "You are a helpful assistant for Curfox delivery system."},
75
- {"role": "user", "content": f"Extract the only waybill/order number from the query. User query: {query}"}
 
76
  ]
77
  waybill_number = ask_openai(extract_message)
78
 
 
63
  # Initial message to check for waybill number in the query
64
  messages = [
65
  {"role": "system", "content": "You are a helpful assistant for Curfox delivery system."},
66
+ {"role": "user", "content": f"""always check user query mentioned the order number/id (example : CA000001)
67
+ if order id provided then output is only : "done"
68
+ if user not given the order number then ask the number from user (include or response to greetings)
69
+ user query : {query}""" }
70
  ]
71
  result = ask_openai(messages)
72
 
 
74
  # Extract the waybill number
75
  extract_message = [
76
  {"role": "system", "content": "You are a helpful assistant for Curfox delivery system."},
77
+ {"role": "user", "content": f"""extract the number from the user query example output is only : CA000001
78
+ user query : {query}""" }
79
  ]
80
  waybill_number = ask_openai(extract_message)
81