Conversation
c1cd005 to
b155de1
Compare
There was a problem hiding this comment.
Bug: API Call in Constructor Causes Instantiation Failures
The BuiltInEmbeddingFunction constructor attempts to auto-detect embedding dimensions by calling self.get_query_embedding("test", "text") when dimensions is None. This external API call during initialization makes object instantiation unreliable, as it can fail due to network issues, invalid API credentials, or service unavailability. Additionally, the call itself is incorrect, passing "text" as a positional argument instead of a keyword argument for source_type, which results in a TypeError at runtime.
pytidb/embeddings/builtin.py#L90-L92
pytidb/pytidb/embeddings/builtin.py
Lines 90 to 92 in 3af724f
Bug: API Change Breaks Existing Code
The QueryBundle TypedDict field name was changed from query_text to query. This breaking API change causes existing code to fail silently, as SearchQuery.__init__ now expects the query field, resulting in None queries and unexpected search behavior. Existing code must be updated to use query instead of query_text.
pytidb/schema.py#L21-L25
Lines 21 to 25 in 3af724f
Was this report helpful? Give feedback by reacting with 👍 or 👎
close #33
In this PR, we will support auto embedding for image with managed-embedding service (e.g.
jina_ai/jina-embeddings-v4)TODO:
We can create a
image_urito store the url or filepath of the image, and add an vector field likeimage_vecviaVectorFieldclass.Different to the auto embeeding for text, you need to specify the type of the source field as
imagevia the parametersource_type="image".After inserted, we can using the
table.search()API to perform vector search on image data.Example: Search images with keywords
Example: Search images with Path object
Example: Search images with PIL Image object