David Hrachovy commited on
Commit
82a0223
·
1 Parent(s): 8257d41
Files changed (3) hide show
  1. app.py +1 -1
  2. estate.db +1 -1
  3. init_db.py +1 -1
app.py CHANGED
@@ -51,7 +51,7 @@ LIMIT 5;
51
 
52
  # Get the OpenAI tools agent prompt
53
  prompt = ChatPromptTemplate.from_messages([
54
- ("system", "You are a helpful assistant. You speak Czech. You can answer questions about real estate projects (novostavby) in Czech Republic. You have access to a database of real estate projects (translate output to Czech too). Some info about the structure of the database: " + db_description + "Note that some json values can be null so you must sometimes check that is IS NOT NULL. Always query projects with structure->'$.ignore'=false or NULL. For calculating you can adapt this query: " + sql_distance_query),
55
  ("placeholder", "{chat_history}"),
56
  ("human", "{input}"),
57
  ("placeholder", "{agent_scratchpad}"),
 
51
 
52
  # Get the OpenAI tools agent prompt
53
  prompt = ChatPromptTemplate.from_messages([
54
+ ("system", "You are a helpful assistant. You speak Czech. You can answer questions about real estate projects (novostavby) in Czech Republic. You have access to a database of real estate projects (translate output to Czech too). Some info about the structure of the database: " + db_description + "Note that some json values can be null so you must sometimes so make sure to add IS NOT NULL when appropriate. Always query projects with structure->'$.ignore'=false or NULL. For calculating you can adapt this query: " + sql_distance_query),
55
  ("placeholder", "{chat_history}"),
56
  ("human", "{input}"),
57
  ("placeholder", "{agent_scratchpad}"),
estate.db CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cf3d4b0ffe9f77b7ebdc2a7b7230299192c969194cca281c91950c8a9fe00ffd
3
  size 2527232
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17722ed41be0a8aeb7fd4a4598bee19c04b4c6d0eb745b172263f9f3ca53bb48
3
  size 2527232
init_db.py CHANGED
@@ -4,7 +4,7 @@ from playhouse.sqlite_ext import *
4
 
5
  # Initialize database
6
 
7
- json_structure = "JSON column with hash with keys 'title': str, official title of the project, 'deposit': int, initial deposit (in percentage) for apartments, 'min_price': int, lowest available apartment price with VAT. It should not be booked or sold., 'average_price_per_sqm': int, average price per square meter of the lowest available apartment. If they sell house and not apartment, calculate only from the apartment size, not size of garden (land), 'status': str, status of the project (preparation, selling, sold out), 'city': str, city of the project, 'lat': float, gps coordinates of the project, 'lng': float, gps coordinates of the project, 'start_year': int, year of construction start, 'end_year': int, estimated year of construction end, 'developer': str, name of the contruction company/developer, 'ignore': bool, if True, the project does not have any apartments for sale, Some values can be null/unknown"
8
 
9
  db = SqliteExtDatabase('estate.db', pragmas=(
10
  ('cache_size', -1024 * 64), # 64MB page-cache.
 
4
 
5
  # Initialize database
6
 
7
+ json_structure = "JSON column with hash with keys 'title': str, official title of the project, 'deposit': int, initial deposit (in percentage) for apartments or null if unknown, 'min_price': int, lowest available apartment price with VAT. It should not be booked or sold., 'average_price_per_sqm': int, average price per square meter of the lowest available apartment. If they sell house and not apartment, calculate only from the apartment size, not size of garden (land), 'status': str, status of the project (preparation, selling, sold out), 'city': str, city of the project, 'lat': float, gps coordinates of the project, 'lng': float, gps coordinates of the project, 'start_year': int, year of construction start, 'end_year': int, estimated year of construction end, 'developer': str, name of the contruction company/developer, 'ignore': bool, if True, the project does not have any apartments for sale, Some values can be null/unknown"
8
 
9
  db = SqliteExtDatabase('estate.db', pragmas=(
10
  ('cache_size', -1024 * 64), # 64MB page-cache.