-
Notifications
You must be signed in to change notification settings - Fork 467
making sessions a first class object #3595
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
PR Summary
This PR elevates sessions to first-class objects in Helicone by adding dedicated session fields to the request_response_rmt table structure.
- Added new columns
session_name,session_id, andsession_pathto the Clickhouse schema, extracted from properties that previously used 'Helicone-Session-*' keys - Added support for audio token tracking with new columns
prompt_audio_tokensandcompletion_audio_tokensin the request_response_rmt table - Implemented a three-step migration process (schema_45-47) that creates a new table structure, copies existing data with session fields extracted, and renames tables
- Added
is_deletedcolumn with default false value to support soft deletion functionality - Updated the RequestResponseRMT interface in
/valhalla/jawn/src/lib/db/ClickhouseWrapper.tsto include the new session and audio token fields
Greptile AI
6 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
| ADD COLUMN IF NOT EXISTS prompt_audio_tokens Int64 DEFAULT 0 | ||
| AFTER prompt_cache_read_tokens, | ||
| ADD COLUMN IF NOT EXISTS completion_audio_tokens Int64 DEFAULT 0 | ||
| AFTER completion_tokens; No newline at end of file |
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.
style: Missing newline at end of file
| AFTER completion_tokens; | |
| AFTER completion_tokens; |
| session_id: string; | ||
| session_name: string; | ||
| session_path: string; |
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.
logic: The session fields are added to RequestResponseRMT but not to InsertRequestResponseVersioned interface. This inconsistency could cause type errors when inserting data.
|
📝 Documentation updates detected! You can review documentation updates here |
Summary
⏳ 1 in progress |
No description provided.