Skip to content

Commit 4a3f9bd

Browse files
committed
feat: add line to reject unrelated questions
1 parent 3a6df55 commit 4a3f9bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/tenantfirstaid/chat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
Use only the information from the file search results to answer the question.
4545
City codes will override the state codes if there is a conflict.
4646
47+
Only answer questions about housing law in Oregon, do not answer questions about other states or topics unrelated to housing law.
48+
4749
Make sure to include a citation to the relevant law in your answer, with a link to the actual web page the law is on using HTML.
4850
Use the following websites for citation links:
4951
https://oregon.public.law/statutes
@@ -97,8 +99,6 @@ def prepare_openai_tools(self, city: str, state: str) -> list | None:
9799
else:
98100
filters = FILTER_OREGON_AND_NULL_CITY
99101

100-
print("Preparing OpenAI tools with filters:", filters)
101-
102102
max_num_results = int(os.getenv("NUM_FILE_SEARCH_RESULTS", 10))
103103

104104
return [

0 commit comments

Comments
 (0)