-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
125 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,39 @@ | ||
"""SQL queries used by A2rchi""" | ||
SQL_INSERT_CONVO = "INSERT INTO conversations (conversation_id, sender, content, ts) VALUES %s RETURNING message_id;" | ||
SQL_INSERT_CONVO = """INSERT INTO conversations ( | ||
conversation_id, sender, content, ts | ||
) | ||
VALUES %s | ||
RETURNING message_id; | ||
""" | ||
|
||
SQL_INSERT_FEEDBACK = "INSERT INTO feedback (mid, feedback_ts, feedback, feedback_msg, incorrect, unhelpful, inappropriate) VALUES (%s, %s, %s, %s, %s, %s, %s);" | ||
SQL_INSERT_FEEDBACK = """INSERT INTO feedback ( | ||
mid, feedback_ts, feedback, feedback_msg, incorrect, unhelpful, inappropriate | ||
) | ||
VALUES (%s, %s, %s, %s, %s, %s, %s); | ||
""" | ||
|
||
SQL_QUERY_CONVO = "SELECT sender, content FROM conversations WHERE conversation_id = %s ORDER BY message_id ASC;" | ||
SQL_QUERY_CONVO = """SELECT ( | ||
sender, content | ||
) | ||
FROM conversations | ||
WHERE conversation_id = %s | ||
ORDER BY message_id ASC; | ||
""" | ||
|
||
SQL_INSERT_TIMING = """INSERT INTO timing ( | ||
mid | ||
client_sent_msg_ts, | ||
server_received_msg_ts, | ||
lock_acquisition_ts, | ||
vectorstore_update_ts, | ||
query_convo_history_ts, | ||
chain_finished_ts, | ||
similarity_search_ts, | ||
a2rchi_message_ts, | ||
insert_convo_ts, | ||
finish_call_ts, | ||
server_response_msg_ts, | ||
msg_duration | ||
) | ||
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s); | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters