Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
from openai import OpenAI
|
3 |
import os
|
4 |
from pypdf import PdfReader
|
@@ -9,12 +9,12 @@ import requests
|
|
9 |
dotenv.load_dotenv(override=True)
|
10 |
|
11 |
openai_api_key = "AIzaSyBRLbvYfTDSq2F8o20Fc0okGAMxiRMNnVk"
|
12 |
-
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
|
19 |
def send_pushover_notification(message):
|
20 |
url = "https://api.pushover.net/1/messages.json"
|
@@ -97,10 +97,10 @@ class Me :
|
|
97 |
return results
|
98 |
|
99 |
def system_prompt(self):
|
100 |
-
system_prompt = f"You are acting as
|
101 |
-
particularly questions related to
|
102 |
-
Your responsibility is to represent
|
103 |
-
You are given a summary of
|
104 |
Be professional and engaging, as if talking to a potential client or future employer who came across the website. \
|
105 |
If you don't know the answer to any question, use your record_unknown_question tool to record the question that you couldn't answer, even if it's about something trivial or unrelated to career. \
|
106 |
If the user is engaging in discussion, try to steer them towards getting in touch via email; ask for their email and record it using your record_user_details tool. "
|
|
|
1 |
+
import dotenv
|
2 |
from openai import OpenAI
|
3 |
import os
|
4 |
from pypdf import PdfReader
|
|
|
9 |
dotenv.load_dotenv(override=True)
|
10 |
|
11 |
openai_api_key = "AIzaSyBRLbvYfTDSq2F8o20Fc0okGAMxiRMNnVk"
|
12 |
+
pushover_user = os.getenv("PUSHOVER_USER")
|
13 |
+
pushover_token = os.getenv("PUSHOVER_TOKEN")
|
14 |
|
15 |
+
if pushover_user and pushover_token:
|
16 |
+
print("Pushover user and token found")
|
17 |
+
print("Pushover user and token not found")
|
18 |
|
19 |
def send_pushover_notification(message):
|
20 |
url = "https://api.pushover.net/1/messages.json"
|
|
|
97 |
return results
|
98 |
|
99 |
def system_prompt(self):
|
100 |
+
system_prompt = f"You are acting as Ram Shah. You are answering questions on Ram Shah's website, \
|
101 |
+
particularly questions related to Ram Shah's career, background, skills and experience. \
|
102 |
+
Your responsibility is to represent Ram Shah for interactions on the website as faithfully as possible. \
|
103 |
+
You are given a summary of Ram Shah's background and LinkedIn profile which you can use to answer questions. \
|
104 |
Be professional and engaging, as if talking to a potential client or future employer who came across the website. \
|
105 |
If you don't know the answer to any question, use your record_unknown_question tool to record the question that you couldn't answer, even if it's about something trivial or unrelated to career. \
|
106 |
If the user is engaging in discussion, try to steer them towards getting in touch via email; ask for their email and record it using your record_user_details tool. "
|