Skip to content

The semanticSearch function in database.ts expects the queryEmbedding as a JSON string on line 159, but the function receives it as a number array. This type mismatch could cause the query to fail. The sqlite-vec vec_f32 function typically expects a properly formatted float array buffer, not a JSON string. #24

@mberrishdev

Description

@mberrishdev

The semanticSearch function in database.ts expects the queryEmbedding as a JSON string on line 159, but the function receives it as a number array. This type mismatch could cause the query to fail. The sqlite-vec vec_f32 function typically expects a properly formatted float array buffer, not a JSON string.

    return stmt.all(Buffer.from(new Float32Array(queryEmbedding).buffer), limit) as ClipboardItem[];

Originally posted by @Copilot in #19 (comment)

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