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

OpenAI query crashes without showing an error #220

Open
yellowtailfan opened this issue Jun 15, 2024 · 1 comment
Open

OpenAI query crashes without showing an error #220

yellowtailfan opened this issue Jun 15, 2024 · 1 comment

Comments

@yellowtailfan
Copy link

yellowtailfan commented Jun 15, 2024

I am using Hishtory in offline mode. I tried both without and with OPENAI_API_KEY set. I am using an OpenAI project key as that's what they recommend using.

Here's the steps starting at the bash prompt:

  1. Ctrl-R
  2. Hishtory TUI query interface appears
  3. Type ? list all images
  4. Hishtory stops and returns to the bash prompt

No messages or errors about OpenAI are shown. There's nothing in the hishtory.log either.

@yellowtailfan
Copy link
Author

There are a bunch of errors in the hishtory log but they seem unrelated. E.g.

time="2024-06-15T12:00:05+10:00" level=info msg="failed to find presaved entry matching cmd=\"grep AI .hishtory/hishtory.log\" even with retry, skipping delete"
time="2024-06-15T12:00:42+10:00" level=info msg="github.com/ddworken/hishtory/client/hctx/hctx.go:105 database is locked (261)\n[0.015ms] [rows:0] CREATE TABLE `history_entries` (`local_username` text,`hostname` text,`command` text,`current_working_directory` text,`home_directory` text,`exit_code` integer,`start_time` datetime,`end_time` datetime,`device_id` text,`entry_id` text,`custom_columns` blob)" fromSQL=true
time="2024-06-15T12:00:42+10:00" level=info msg="github.com/ddworken/hishtory/client/hctx/hctx.go:106 database is locked (261)\n[0.015ms] [rows:0] PRAGMA journal_mode = WAL" fromSQL=true
time="2024-06-15T12:00:42+10:00" level=info msg="github.com/ddworken/hishtory/client/hctx/hctx.go:107 database is locked (261)\n[0.011ms] [rows:0] CREATE INDEX IF NOT EXISTS start_time_index ON history_entries(start_time)" fromSQL=true
time="2024-06-15T12:00:42+10:00" level=info msg="github.com/ddworken/hishtory/client/hctx/hctx.go:108 database is locked (261)\n[0.011ms] [rows:0] CREATE INDEX IF NOT EXISTS end_time_index ON history_entries(end_time)" fromSQL=true
time="2024-06-15T12:00:42+10:00" level=info msg="github.com/ddworken/hishtory/client/hctx/hctx.go:109 database is locked (261)\n[0.008ms] [rows:0] CREATE INDEX IF NOT EXISTS entry_id_index ON history_entries(entry_id)" fromSQL=true
time="2024-06-15T12:00:42+10:00" level=info msg="Skipping saving a history entry because we did not build a history entry (was the command prefixed with a space and/or empty?)\n"

I installed using:

curl https://hishtory.dev/install.py | HISHTORY_OFFLINE=true python3 -

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

No branches or pull requests

1 participant