Skip to content

Releases: pinecone-io/pinecone-ts-client

v3.0.3

11 Sep 18:18
399803e
Compare
Choose a tag to compare

Fixes

  • Remove extra logging from getFetch() s/o @maxmetcalfe in #280
  • Some general fixes/internal enhancements to CI workflows

New Contributors

Full Changelog: 3.0.2...v3.0.3

3.0.2

26 Aug 23:44
Compare
Choose a tag to compare

Fixes

Remove util:node function

This patch removes a native Node utility function that was causing issues for users running in Edge. There are no downstream affects of its removal; code should run as it previously was without interruptions or changes.

New Contributors

Full Changelog: v3.0.1...3.0.2

v3.0.1

20 Aug 22:56
Compare
Choose a tag to compare

Fixes

Compatibility with Edge runtimes

This patch removes the @sinclair/typebox and ajv libraries, which caused compatibility issues for users running in Edge runtimes (Cloudflare, Vercel, etc.).

Removal of crossFetch ponyfill

Since this Typescript client no longer supports versions of Node <18, we can remove the crossFetch ponyfill from src/utils/fetch.ts, as it was only necessary as a failsafe for users running older versions of Node.

New Contributors

Full Changelog: v3.0.0...v3.0.1

Release v3.0.0

19 Jul 19:23
Compare
Choose a tag to compare

Features

API versioning

This updated release of the Pinecone TypeScript SDK depends on API version 2024-07. This v3 SDK release line should continue to receive fixes as long as the 2024-07 API version is in support.

Inference API

Try out Pinecone's new Inference API, currently in public preview.

import { Pinecone } from '@pinecone-database/pinecone';

const client = new Pinecone({ apiKey: 'YOUR_API_KEY' });
const model = 'multilingual-e5-large';

const text = [
  'Turkey is a classic meat to eat at American Thanksgiving.',
  'Many people enjoy the beautiful mosques in Turkey.',
];

async function generateDocEmbeddings() {
  try {
    return await client.inference.embed(
      model,
      input: text,
      params: { inputType: 'passage', truncate: 'END' }
    );
  } catch (error) {
    console.error('Error generating embeddings:', error);
  }
}

Deletion Protection

Use deletion protection to prevent your most important indexes from accidentally being deleted. This feature is available for both serverless and pod indexes.

To enable this feature for existing indexes, use configureIndex.

import { Pinecone } from '@pinecone-database/pinecone';

const client = new Pinecone({ apiKey: 'YOUR_API_KEY' });

// Enable deletion protection
await client.configureIndex('example-index', { deletionProtection: 'enabled' });

When deletion protection is enabled, calls to deleteIndex will fail until you first disable the deletion protection.

// To disable deletion protection
await client.configureIndex('example-index', { deletionProtection: 'disabled' });

If you want to enable this feature at the time of index creation, createIndex now accepts an optional keyword argument. The feature is disabled by default.

import { Pinecone } from '@pinecone-database/pinecone';

const client = new Pinecone({ apiKey: 'YOUR_API_KEY' });
await client.createIndex({ 
  name: 'example-index',
  dimension: 1024,
  metric: 'cosine',
  deletionProtection: 'enabled',
  spec : { serverless: { cloud: 'aws', region: 'us-west-2' }},
});

Node support

Previously, the TypeScript SDK supported all versions of Node >=14.0.0. With this release we've moved support to Node >=18.0.0 due to prior versions having reached end of life and security support for versions prior to 18.0.0.

Fixes

  • Fixed an issue where QueryByVectorValues type did not correctly represent sparseValues which closed issue #236. Thanks to @max-tano for reporting.

Full Changelog: v2.2.2...v3.0.0

v2.2.2 Release

01 Jun 00:32
Compare
Choose a tag to compare

This patch fixes a bug when instantiating multiple instances of Pinecone and using multiple API keys targeting different indexes. The singleton cache that resolves index addresses will no longer hang on to the first API key it used to describe an index.

What's Changed

New Contributors

Full Changelog: v2.2.1...v2.2.2

v.2.2.1 Release

10 May 20:30
Compare
Choose a tag to compare

This patch fixes an issue with using sourceTag as an argument without disabling runtime validations.

What's Changed

Full Changelog: v2.2.0...v2.2.1

v2.2.0 Release

27 Mar 22:45
Compare
Choose a tag to compare

sourceTag added to PineconeConfiguration

The SDK now supports optionally passing a sourceTag when instantiating the Pinecone client. This tag allows requests made by the SDK to be attributed via the user-agent.

import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone({ apiKey: 'my-api-key', sourceTag: 'my-source-tag' });

// Requests made from the client will now have this tag applied to the user-agent

What's Changed

  • Add sourceTag to PineconeConfiguration and additionalHeaders to data plane calls by @austin-denoble in #197

Full Changelog: v2.1.1...v2.2.0

v2.1.1 Release

26 Mar 15:10
Compare
Choose a tag to compare

Exports the ListResponse interface so it can be used by consumers of the client.

What's Changed

  • Export ListResponse type from generated core, add docstring for ListOptions by @austin-denoble in #210

Full Changelog: v2.1.0...v2.1.1

v2.1.0 Release

06 Mar 20:44
Compare
Choose a tag to compare

Listing record ids by prefix in a namespace (for serverless indexes)

We've implemented SDK support for a new data plane endpoint used to list ids by prefix in a given namespace. If no prefix or an empty string is passed, this can be used to list all ids in a namespace.

The index class now has a listPaginated function. With clever assignment of record ids, this can be used to help model hierarchical relationships between different records such as when you have embeddings for multiple chunks or fragments related to the same document.

You can fetch each page of results with listPaginated.

const pc = new Pinecone();
const index = pc.index('my-index').namespace('my-namespace');

const results = await index.listPaginated({ prefix: 'doc1#' });
console.log(results);
// {
//   vectors: [
//     { id: 'doc1#01' }, { id: 'doc1#02' }, { id: 'doc1#03' },
//     { id: 'doc1#04' }, { id: 'doc1#05' },  { id: 'doc1#06' },
//     { id: 'doc1#07' }, { id: 'doc1#08' }, { id: 'doc1#09' },
//     ...
//   ],
//   pagination: {
//     next: 'eyJza2lwX3Bhc3QiOiJwcmVUZXN0LS04MCIsInByZWZpeCI6InByZVRlc3QifQ=='
//   },
//   namespace: 'my-namespace',
//   usage: { readUnits: 1 }
// }

// Fetch the next page of results
await index.listPaginated({
  prefix: 'doc1#',
  paginationToken: results.pagination.next,
});

Fixes

  • types(update): wrap metadata param in Partial by @omikader in #199

Chores

New Contributors

Full Changelog: v2.0.1...v2.1.0

v2.0.1 Release

17 Jan 17:28
Compare
Choose a tag to compare

Fixes a build issue that was caused during our automated release process.

What's Changed

Full Changelog: v2.0.0...v2.0.1