Spaces:
Sleeping
Sleeping
Jonah Ramponi
commited on
Commit
•
06d98e4
1
Parent(s):
f7a8e9f
final cleanup for today
Browse files- utils/format.py +7 -3
- utils/interview_messages.py +17 -0
utils/format.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import json
|
2 |
from typing import Union
|
3 |
|
|
|
|
|
4 |
|
5 |
def extract_json(input_string: str) -> Union[bool, dict]:
|
6 |
"""String to Json function"""
|
@@ -29,15 +31,17 @@ def format_chat_history_cohere(chat_history: list, background_info: dict) -> lis
|
|
29 |
new_output = [
|
30 |
{
|
31 |
"role": "USER",
|
32 |
-
"message":
|
|
|
|
|
33 |
},
|
34 |
{
|
35 |
"role": "CHATBOT",
|
36 |
-
"message": f"Thanks. Can you send me the job posting?",
|
37 |
},
|
38 |
{
|
39 |
"role": "USER",
|
40 |
-
"message": f"Here is the job posting: {background_info['job_posting']}",
|
41 |
},
|
42 |
]
|
43 |
|
|
|
1 |
import json
|
2 |
from typing import Union
|
3 |
|
4 |
+
from utils.interview_messages import first_conversation_message
|
5 |
+
|
6 |
|
7 |
def extract_json(input_string: str) -> Union[bool, dict]:
|
8 |
"""String to Json function"""
|
|
|
31 |
new_output = [
|
32 |
{
|
33 |
"role": "USER",
|
34 |
+
"message": first_conversation_message.replace(
|
35 |
+
"<cv>", background_info["cv"]
|
36 |
+
),
|
37 |
},
|
38 |
{
|
39 |
"role": "CHATBOT",
|
40 |
+
"message": f"Thanks. Can you send me the job posting so I can reference that while I think of some questions to ask you?",
|
41 |
},
|
42 |
{
|
43 |
"role": "USER",
|
44 |
+
"message": f"Here is the contents of the job posting that I'm interested in: {background_info['job_posting']}",
|
45 |
},
|
46 |
]
|
47 |
|
utils/interview_messages.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
first_conversation_message = """
|
2 |
+
Hello,
|
3 |
+
|
4 |
+
here is my CV! <cv>
|
5 |
+
|
6 |
+
I'd like you to act as a senior technical recruiter.
|
7 |
+
Critique my CV and its' suitability for the role.
|
8 |
+
You may only ask me one question at a time.
|
9 |
+
Be as critical of the CV as possible, really focus on the CV and its relevance to the role.
|
10 |
+
|
11 |
+
Ask about:
|
12 |
+
- inconsistencies
|
13 |
+
- mistakes in grammar
|
14 |
+
- things which are technically not quite right suggesting a misunderstanding
|
15 |
+
- ask me to justify claims I make in my CV.
|
16 |
+
- about specific technical details about the architectures I have used.
|
17 |
+
"""
|