Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -9,6 +9,7 @@ api_key = os.environ["OPENAI_API_KEY"]
|
|
| 9 |
|
| 10 |
# Declare the continuous function as an async function.
|
| 11 |
def streaming(userText,idf):
|
|
|
|
| 12 |
if str(idf)=="1":
|
| 13 |
openaikey = api_key
|
| 14 |
openai.api_key = openaikey
|
|
@@ -57,22 +58,27 @@ def streaming(userText,idf):
|
|
| 57 |
model="gpt-4",
|
| 58 |
stream=True,
|
| 59 |
messages=[{"role":"system","content":"""
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
-
\n\nAfter the prospect provides budget details then only, inquire about and assess their specific needs and pain points.'
|
| 76 |
|
| 77 |
\n\nnote : don't ask same questions again and again always give single response, don't iclude the prospect, sdr conversation responses\n\n """},
|
| 78 |
|
|
|
|
| 9 |
|
| 10 |
# Declare the continuous function as an async function.
|
| 11 |
def streaming(userText,idf):
|
| 12 |
+
import openai
|
| 13 |
if str(idf)=="1":
|
| 14 |
openaikey = api_key
|
| 15 |
openai.api_key = openaikey
|
|
|
|
| 58 |
model="gpt-4",
|
| 59 |
stream=True,
|
| 60 |
messages=[{"role":"system","content":"""
|
| 61 |
+
1. When the prospect wishes to end or leave the conversation/call:
|
| 62 |
+
- Response: "I understand. Thank you for your time today. If you have any questions or need further assistance in the future, please don't hesitate to reach out. Have a great day!"
|
| 63 |
+
|
| 64 |
+
2. If the prospect confirms the schedule for the call:
|
| 65 |
+
- Response: "That's great! I just wanted to confirm that (time) still works for you and that you are able to be on. Is that still the case?"
|
| 66 |
+
|
| 67 |
+
3. If the prospect wants to cancel the meeting without rescheduling:
|
| 68 |
+
- Response: "I appreciate you letting me know. If this is about finding a suitable time, let's figure out a slot that works for both of us. I'm available for both morning and afternoon sessions this week. What do you prefer?"
|
| 69 |
+
|
| 70 |
+
4. If the prospect wishes to reschedule the meeting without specifying a time (AM or PM):
|
| 71 |
+
- Response: "Certainly, let's find a new time that works for both of us. How about we consider 10 AM, 12 PM, or 3 PM? Please let me know which time suits you best."
|
| 72 |
+
|
| 73 |
+
5. If the prospect wishes to reschedule the meeting with a specific day and time:
|
| 74 |
+
- Response: "Understood. I can make (prospect provided time). I will update our schedule accordingly. Thank you for letting us know."
|
| 75 |
+
|
| 76 |
+
6. After confirming the meeting time:
|
| 77 |
+
- Question: "Before we begin our conversation, it would be helpful to know more about your financial landscape. Are there specific budgetary constraints or financial aspects that we should take into account to ensure our discussion is tailored to your needs?"
|
| 78 |
+
|
| 79 |
+
7. After the prospect provides budget details:
|
| 80 |
+
- Inquiry: "Thank you for sharing that information. Could you tell me more about your specific needs and pain points? Understanding these will help us address your concerns more effectively."
|
| 81 |
|
|
|
|
| 82 |
|
| 83 |
\n\nnote : don't ask same questions again and again always give single response, don't iclude the prospect, sdr conversation responses\n\n """},
|
| 84 |
|