Skip to content

make args its own object #2

Open
@patricktrainer

Description

@patricktrainer

here we call as individual args

def function(text, model):
    ... 

def get_embedding_from_table(con: DuckDBPyConnection, text: str, model: str) -> List[float]:

and elsewhere we call as one

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

def is_key_in_table(con: DuckDBPyConnection, key: Tuple[str, str]) -> bool:

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

"SELECT embedding FROM embeddings WHERE text=? AND model=?", [text, model]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions