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

Log prompts and responses to SQLite #2

Closed
simonw opened this issue Apr 1, 2023 · 2 comments
Closed

Log prompts and responses to SQLite #2

simonw opened this issue Apr 1, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Apr 1, 2023

This is the feature I built llm for. I want to log my interactions to a SQLite database.

@simonw simonw added the enhancement New feature or request label Apr 1, 2023
@simonw
Copy link
Owner Author

simonw commented Apr 1, 2023

I'm going to have this work by saying "if ``/.llm/log.db` exists, log messages to that database".

Later on I may come up with more advanced ways of configuring this.

It will default to logging - provided that DB exists already - but there will be a command line option for "don't log".

A llm init-db command will create the database for you if it does not exist yet.

@simonw
Copy link
Owner Author

simonw commented Apr 1, 2023

New docs:

Logging to SQLite

If a SQLite database file exists in ~/.llm/log.db then the tool will log all prompts and responses to it.

You can create that file by running the init-db command:

llm init-db

Now any prompts you run will be logged to that database.

To avoid logging a prompt, pass --no-log or -n to the command:

llm 'Ten names for cheesecakes' -n

@simonw simonw closed this as completed in 1a840cd Apr 1, 2023
simonw added a commit that referenced this issue Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant