Spaces:
Sleeping
Sleeping
Update client.py
Browse files
client.py
CHANGED
|
@@ -32,7 +32,7 @@ def get_completion(ticket:model.Ticket):
|
|
| 32 |
max_tokens=1000,
|
| 33 |
n=1,
|
| 34 |
stop=None,
|
| 35 |
-
temperature=
|
| 36 |
)
|
| 37 |
result = response.choices[0].text.strip()
|
| 38 |
print(result)
|
|
@@ -44,15 +44,13 @@ def create_prompt(subject:str, desc:str):
|
|
| 44 |
prompt = '''
|
| 45 |
You are an AI Customer Service Agent for booking.com. Please use the below instructions to answer.
|
| 46 |
Categorize the following request : ```
|
| 47 |
-
Subject: {{subject}} Description: {{desc}}``` in 1 single word? Use
|
| 48 |
-
|
| 49 |
-
Cancellation Request
|
| 50 |
Refund Request
|
|
|
|
| 51 |
|
| 52 |
In the context of the previous request, Suggest a resolution response to address the customer query from the following actions list:
|
| 53 |
-
|
| 54 |
-
Cancellation
|
| 55 |
Issue Refund
|
|
|
|
| 56 |
|
| 57 |
Finally, Summarize the message: ```
|
| 58 |
Subject: {{subject}}Description:{{desc}}``` and generate a mail content for the customer about the whole conversation.
|
|
|
|
| 32 |
max_tokens=1000,
|
| 33 |
n=1,
|
| 34 |
stop=None,
|
| 35 |
+
temperature=1
|
| 36 |
)
|
| 37 |
result = response.choices[0].text.strip()
|
| 38 |
print(result)
|
|
|
|
| 44 |
prompt = '''
|
| 45 |
You are an AI Customer Service Agent for booking.com. Please use the below instructions to answer.
|
| 46 |
Categorize the following request : ```
|
| 47 |
+
Subject: {{subject}} Description: {{desc}}``` in 1 single word? Use one of the below options to categorize:
|
|
|
|
|
|
|
| 48 |
Refund Request
|
| 49 |
+
Cancellation Request
|
| 50 |
|
| 51 |
In the context of the previous request, Suggest a resolution response to address the customer query from the following actions list:
|
|
|
|
|
|
|
| 52 |
Issue Refund
|
| 53 |
+
Cancel Booking
|
| 54 |
|
| 55 |
Finally, Summarize the message: ```
|
| 56 |
Subject: {{subject}}Description:{{desc}}``` and generate a mail content for the customer about the whole conversation.
|