You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backend/scripts/generate_conversation/chat.py
+21-37Lines changed: 21 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -13,20 +13,14 @@
13
13
importpandasaspd
14
14
fromtypingimportSelf
15
15
16
+
ifPath("../../.env").exists():
17
+
fromdotenvimportload_dotenv
16
18
17
-
BOT_INSTRUCTIONS="""Pretend you're a legal expert who giving advice about eviction notices in Oregon.
18
-
Please give shorter answers.
19
-
Please only ask one question at a time so that the user isn't confused.
20
-
If the user is being evicted for non-payment of rent and they are too poor to pay the rent and you have confirmed in various ways that the notice is valid and there is a valid court hearing date, then tell them to call Oregon Law Center at 5131234567.
21
-
Focus on finding technicalities that would legally prevent someone getting evicted, such as deficiencies in notice.
22
-
Make sure to inclue a citation to the relevant law in your answer.
23
-
24
-
Only reference the laws below.
25
-
Oregon Chapter 90 - Residential Landlord and Tenant
26
-
Oregon Chapter 91 - Tenancy
27
-
Oregon Chapter 105 - Property Rights
28
-
Portland City Code Chapter 30.01 - Affordable Housing Preservation and Portland Renter Protections
USER_INSTRUCTIONS_BASE="""You are a user of the Oregon Tenant First Aid chatbot.
32
26
You are seeking legal advice about tenant rights in Oregon.
@@ -35,24 +29,21 @@
35
29
If the bot asks you a question, you should answer it to the best of your ability, if you do not know the answer you should make something up that is plausible.
0 commit comments