Skip to content
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 a history page (static) #967

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

niuguy
Copy link

@niuguy niuguy commented Oct 31, 2024

The idea is simply to add a static history page and store the generated reports in a local SQLite database. Here are some screenshots for reference:

US election

US Election 2024 A Comprehensive

This is more of a proposal, but I think it might be more straightforward to submit a PR. Looking forward to the feedback!

@ElishaKay
Copy link
Collaborator

Love it.

I'm voting for Postgres as the default data store, since it's also supported by langchain vector stores - see PGVector

But, great proof of concept :)

@niuguy
Copy link
Author

niuguy commented Oct 31, 2024

@ElishaKay Yes, integrating with Postgres is certainly viable if that’s the plan. I’m using SQLite for now just for simplicity—it’s just a single file for the database, after all

@muditjuneja
Copy link

Any update on this PR?

from datetime import datetime

def init_db():
conn = sqlite3.connect('research_history.db')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move the db name as a const at the top and reuse the same name in other functions?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link

@muditjuneja muditjuneja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for starters.
Maintainers wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants