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

Realtime embedding updates #38

Merged
merged 20 commits into from
Jan 29, 2024
Merged

Realtime embedding updates #38

merged 20 commits into from
Jan 29, 2024

Conversation

ChuckHend
Copy link
Member

  • Implements triggers to the table applied in vectorize.table that handle row updates.
  • changes default schedule parameter to realtime

@ChuckHend ChuckHend marked this pull request as ready for review January 28, 2024 20:41
Copy link

@DarrenBaldwin07 DarrenBaldwin07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very clean! LGTM

@@ -23,7 +25,8 @@ fn table(
transformer: default!(String, "'text-embedding-ada-002'"),
search_alg: default!(types::SimilarityAlg, "'pgv_cosine_similarity'"),
table_method: default!(types::TableMethod, "'append'"),
schedule: default!(String, "'* * * * *'"),
// cron-like for a cron based update model, or 'realtime' for a trigger-based
schedule: default!(String, "'realtime'"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like having options here for both approaches ✅

@@ -29,7 +28,7 @@ pub async fn handle_response<T: for<'de> serde::Deserialize<'de>>(
// handle an OpenAI compatible embedding transform request
pub async fn openai_embedding_request(request: EmbeddingRequest) -> Result<Vec<Vec<f64>>> {
log!(
"pg-vectorize: openai request size: {}",
"pg-vectorize: embedding request size: {}",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :)

@ChuckHend ChuckHend merged commit 454af54 into main Jan 29, 2024
5 checks passed
@ChuckHend ChuckHend deleted the realtime branch January 29, 2024 20:38
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

Successfully merging this pull request may close these issues.

2 participants