duckdb-embedding-search icon indicating copy to clipboard operation
duckdb-embedding-search copied to clipboard

make args its own object

Open patricktrainer opened this issue 1 year ago • 0 comments

here we call as individual args

def function(text, model):
    ... 

https://github.com/patricktrainer/duckdb-embedding-search/blob/fcf19ac196090df13fc237026a92e0eb5be1df72/src/operations.py#L139

and elsewhere we call as one

key = tuple(text, model)
def function(key)
    ...

https://github.com/patricktrainer/duckdb-embedding-search/blob/fcf19ac196090df13fc237026a92e0eb5be1df72/src/operations.py#L47

the "key" is used as the primary key for the embeddings table. It should probably be immutable.

https://github.com/patricktrainer/duckdb-embedding-search/blob/fcf19ac196090df13fc237026a92e0eb5be1df72/src/operations.py#L155

patricktrainer avatar May 29 '24 00:05 patricktrainer