-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat: add hyperswitch ai chats table #8831
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
base: main
Are you sure you want to change the base?
Conversation
…perswitch into add-hyperswitch-ai-chats-table
…perswitch into add-hyperswitch-ai-chats-table
61c4d2c
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.
Other than that, looks good to me!
migrations/2025-07-21-120614_add_table_for_hyperswitch_ai_interactions/up.sql
Show resolved
Hide resolved
…perswitch into add-hyperswitch-ai-chats-table
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.
Core changes looks good!
7b919cd
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.
Core changes looks good
Type of Change
Description
Additional Changes
This pull request introduces support for encrypted chat conversations and adds database models and APIs for storing and retrieving chat interactions. The changes span configuration, API models, database schema, and core logic to enable secure chat storage and querying, with proper secret management for encryption keys.
Chat encryption and configuration:
encryption_key
to[chat]
sections in all config files and updatedChatSettings
to use a secret for the encryption key, with secret management integration for secure handling.Chat API model extensions:
ChatListRequest
,ChatConversation
,ChatListResponse
)Database schema and models for chat interactions:
hyperswitch_ai_interaction
table and corresponding Rust models for storing encrypted chat queries andCore chat logic improvements:
Run this as part of migration
1.Manual Partition creation for next two year.
2.Creates partitions for each 3-month range
3.Add calendar event to re run this after two year.
General enhancements and constants:
Motivation and Context
Closes #8847
How did you test it?
Hitting AI service, should store information in DB
Can check hyperswitch AI interaction table for it.
Internal roles can see the list of interactions for the given merchant id
List
Checklist
cargo +nightly fmt --all
cargo clippy