-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
New logging schema for conversations and continue mode #91
Comments
Current schema: Lines 78 to 91 in 23eeb0f
But I want to instead log conversations and responses. Here's what those look like at the code level right now: Lines 47 to 52 in 23eeb0f
Lines 74 to 89 in 23eeb0f
I think I'm going to replace or remove the Lines 32 to 44 in 23eeb0f
|
I'm a bit nervous about these ULIDs, which look like this: >>> str(ulid.ULID()).lower()
'01h51r2j69dbj1qma2874bywvw'
>>> str(ulid.ULID()).lower()
'01h51r2jvwkx2d8t8dweynrkvb'
>>> str(ulid.ULID()).lower()
'01h51r2kay2hqj9ymw5fmckmhw' (They are case-insensitive, I think lower-case is visually prettier.) The downside of these is that they aren't things people can type, unlike But... I expect most CLI usage of the continue mode to use The benefit of them is that they're globally unique, like UUIDs - which is great news if you want to e.g. run prompts on your local machine and then upload them to a shared space later. Since shared prompt libraries feel like a useful thing to support, I'm going to use ULIDs. |
Calling them "conversations" does also mean that the
Since |
I think the option is |
OK, I got the new schema working and got I'll move that work to a PR. |
Here's the new schema: CREATE TABLE [conversations] (
[id] TEXT PRIMARY KEY,
[name] TEXT,
[model] TEXT
);
CREATE TABLE [responses] (
[id] TEXT PRIMARY KEY,
[model] TEXT,
[prompt] TEXT,
[system] TEXT,
[prompt_json] TEXT,
[options_json] TEXT,
[response] TEXT,
[response_json] TEXT,
[conversation_id] TEXT REFERENCES [conversations]([id]),
[duration_ms] INTEGER,
[datetime_utc] TEXT
); |
Originally posted by @simonw in #85 (comment)
The text was updated successfully, but these errors were encountered: