0.1.1 • Published 1 month ago

turbopuffer-sdk v0.1.1

Weekly downloads
-
License
-
Repository
github
Last release
1 month ago

Install

npm install turbopuffer-sdk

Usage

import { TurboPufferApiClientV1 } from 'turbopuffer-sdk'

const client = new TurboPufferApiClientV1({
    token: process.env.TURBOPUFFER_KEY,
})

const namespace = 'test'
const upsertRes = await client.upsertVectors({
    namespace,
    vectors: [{ id: 1, vector: [1, 2, 3], attributes: { hello: 'ciao' } }],
})

const vectors = await client.listAllVectors({ namespace })

const results = await puffer.queryVectors({
    namespace,
    distance_metric: 'cosine_distance',
    include_attributes,
    vector: [1, 2, 3],
})

const delRes = await client.deleteNamespace({ namespace })
0.1.0

1 month ago

0.1.1

1 month ago

0.0.2

5 months ago

0.0.1

5 months ago