Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -147,17 +147,17 @@ def qa_automation(text: str):
|
|
| 147 |
# "Did the agent get a promise to pay? Provide Details."
|
| 148 |
"Rate the satisfaction of the customer on a scale of 10. 0 being worse and 10 being best.",
|
| 149 |
#"Rate the customer effort on a scale of 0-10. 0 being the most effort spent by the customer and 10 being least effort:",
|
| 150 |
-
"How could the agent have made the call easier for the customer in 3 simple steps?"
|
| 151 |
]
|
| 152 |
answers = []
|
| 153 |
for question in questions:
|
| 154 |
response = client.chat.completions.create(
|
| 155 |
model = deployment_name,
|
| 156 |
messages=[
|
| 157 |
-
{"role": "system", "content": "You are an AI assistant evaluating a customer service call based on quality assurance criteria."},
|
| 158 |
-
{"role": "user", "content": f"Question: {question}\nTranscript: {text}\nAnswer:"}
|
| 159 |
],
|
| 160 |
-
max_tokens=
|
| 161 |
temperature=0.5
|
| 162 |
)
|
| 163 |
if response.choices:
|
|
|
|
| 147 |
# "Did the agent get a promise to pay? Provide Details."
|
| 148 |
"Rate the satisfaction of the customer on a scale of 10. 0 being worse and 10 being best.",
|
| 149 |
#"Rate the customer effort on a scale of 0-10. 0 being the most effort spent by the customer and 10 being least effort:",
|
| 150 |
+
"How could the agent have made the call easier for the customer in upto 3 simple steps?"
|
| 151 |
]
|
| 152 |
answers = []
|
| 153 |
for question in questions:
|
| 154 |
response = client.chat.completions.create(
|
| 155 |
model = deployment_name,
|
| 156 |
messages=[
|
| 157 |
+
{"role": "system", "content": "You are an AI assistant evaluating a customer service call based on quality assurance criteria. Keep responses concise."},
|
| 158 |
+
{"role": "user", "content": f"Question: {question}\nTranscript: {text}\nAnswer with a brief Yes/No and a short reason (max 2 sentences):"}
|
| 159 |
],
|
| 160 |
+
max_tokens=100,
|
| 161 |
temperature=0.5
|
| 162 |
)
|
| 163 |
if response.choices:
|