Skip to content

Commit

Permalink
Merge pull request #47 from 2405-team3/ui/metrics-chart
Browse files Browse the repository at this point in the history
UI/metrics chart + comment/log cleanup
  • Loading branch information
bboinay authored Aug 15, 2024
2 parents 18e300f + 8c77aa6 commit a5d5f4a
Show file tree
Hide file tree
Showing 14 changed files with 1,540 additions and 32 deletions.
2 changes: 1 addition & 1 deletion evals/eval_pg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def insert_dict_in(dict, table=''):
conn.commit()
cursor.close()
conn.close()
print(f"JSONB data stored in '{table}' successfully.")
log.info(f"JSONB data stored in '{table}' successfully.")

def get_data_from(table=''):
log.info(f"retrieving data from {table}")
Expand Down
10 changes: 5 additions & 5 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ async def upload_file(id: str, file: UploadFile=File(...)):
@app.post('/api/query')
async def post_query(body: pq.QueryBody):
response = pq.post_query(body)
# evals.store_running_eval_data(
# body.chatbot_id,
# body.query,
# response
# )
evals.store_running_eval_data(
body.chatbot_id,
body.query,
response
)
return response

@app.get('/api/history')
Expand Down
4 changes: 2 additions & 2 deletions ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>Paisley</title>
</head>
<body>
<div id="root"></div>
Expand Down
Loading

0 comments on commit a5d5f4a

Please sign in to comment.