Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -63,8 +63,8 @@ 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 order number is present in the query (e.g., CA000001).
|
67 |
-
Respond 'done' if present, otherwise prompt the user to provide the number."""}
|
68 |
]
|
69 |
result = ask_openai(messages)
|
70 |
|
@@ -72,7 +72,7 @@ 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 waybill 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"""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 |
# 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 |
|