Skip to content

Commit

Permalink
created API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Nov 8, 2023
1 parent 49127aa commit 1e350da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions ai_ta_backend/export_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import os
import datetime
import pandas as pd
import supabase

def export_convo_history_csv(course_name: str, from_date= None, to_date= None):
"""
Export conversation history to csv file.
Optional args: from_date, to_date
"""
return "success"
2 changes: 1 addition & 1 deletion ai_ta_backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def logToNomic():
return

@app.route('/export-convo-history-csv', methods=['GET'])
def nomic_map():
def export_convo_history():
course_name: str = request.args.get('course_name', default='', type=str)
from_date: str = request.args.get('from_date', default='', type=str)
to_date: str = request.args.get('to_date', default='', type=str)
Expand Down

0 comments on commit 1e350da

Please sign in to comment.