-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CSV Download frontend and backend #70
Conversation
jojortz
commented
Sep 27, 2023
- Updated save_to_csv function for both the rag_database and qa_database
- Added endpoints for saving to CSV for RAG table and QA Table
- Created Modal UI component and custom DownloadModal for CSV filename input on download
- Added DownloadModal and Download button to Chatbot and RAGChatbot frontend compoenents
Great work! I just tested the Download button, it can download all my data. One more feature to improve the user experience: When I downloaded the file, I didn't know where it's saved at. Could you add the note in the download UI that "will be saved in the |
Regarding the download feature, I am just curious how hard it is to have a pop up window and let user pick the download location? User might git clone pykoi at any arbitrary location, so download at |
@@ -6,24 +6,29 @@ | |||
You can follow [the installation guide](https://github.com/CambioML/pykoi/tree/install#option-1-rag-cpu) | |||
to set up the environment. | |||
- Run the demo: | |||
1. Enter your OpenAI API key in the `api_key` below. | |||
1. Enter your OpenAI API key a .env file in the `~/pykoi` directory with the name OPEN_API_KEY, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: ~/pykoi
directory might not exist depending on where user clone the repo. You can say pykoi root directory.
- Run the demo: | ||
1. Enter your OpenAI API key in the `api_key` below. | ||
2. On terminal and `~/pykoi` directory, run | ||
1. Enter your OpenAI API key a .env file in the `~/pykoi` directory with the name OPEN_API_KEY, e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: same
class RetrievalNewMessage(BaseModel): | ||
prompt: str | ||
file_names: List[str] | ||
|
||
class QATableToCSV(BaseModel): | ||
file_name: str | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: make sure you run black
command to make sure 2 lines between each class to avoid pylint and flake8 linting warning.
# list separator | ||
QA_LIST_SEPARATOR = "||" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: run black
command or add an empty line.
LGTM overall. TODO for next pr
|