-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(server): CLIP search integration #1939
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
} | ||
|
||
try { | ||
const clip = await this.machineLearning.encodeImage({ thumbnailPath: asset.resizePath }); |
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.
I think we should be able to pass in a full-size image and the library will resize it appropriately, that might yield slightly better results than using an already-resized thumb?
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.
Yea agreed, we should have each service do the resize itself imo so they get the exact size they need for optional recognition
const { results } = await this.client.multiSearch.perform({ | ||
searches: [ | ||
{ | ||
collection: alias.collection_name, | ||
q: '*', | ||
vector_query: `smartInfo.clip:([${input.join(',')}], k:100)`, | ||
} as any, | ||
], | ||
}); |
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.
I think this search currently doesn't scope by userId, is that right?
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.
Ah, yeah forgot to add that back in
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.
Also, from playing around on the preview a little: It seems like we're always returning 10 results exactly, and not bounding by a minimum score, is that correct?
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.
Great question, will have to research what the default page size is here
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.
Scoped by user id, an no idea what minimum distance for cutting off results, limited to 100 results though.
Searching currently errors out pretty hard if typesense hasn't been initialized yet, we should probably handle that a little bit better. Error
Things were reindexed by running the metadata extract job, but this error kept happening until I restarted the server container - not sure why that was. |
bfa3511
to
e03d921
Compare
983e12c
to
042bfe1
Compare
No description provided.