Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency @pinecone-database/pinecone to v5 #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 24, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@pinecone-database/pinecone ^4.0.0 -> ^5.0.0 age adoption passing confidence

Release Notes

pinecone-io/pinecone-ts-client (@​pinecone-database/pinecone)

v5.0.2

Compare Source

Types Embedding and EmbeddingsListUsage are now exported from the top of the client package.

Full Changelog: pinecone-io/pinecone-ts-client@v5.0.1...v5.0.2

v5.0.1

Compare Source

What's Changed

Full Changelog: pinecone-io/pinecone-ts-client@v5.0.0...v5.0.1

v5.0.0

Compare Source

This version of the Pinecone Node SDK depends on version 2025-01 of the Pinecone API. You can read more about versioning here. This v5 SDK release line should continue to receive fixes as long as the 2025-01 API version is in support.

Features

Sparse index support

You can now work with sparse-only indexes. These indexes enable direct indexing and retrieval of sparse vectors, supporting traditional methods like BM25 and learned sparse models such as pinecone-sparse-english-v0. You can read more about getting started with sparse-only indexes here.

The following example demonstrates creating a new sparse-only index, and upserting some arbitrary sparse vector data:

import { Pinecone } from '@​pinecone-database/pinecone';
const pc = new Pinecone();

// create a sparse serverless index
await pc.createIndex({
  name: 'sample-index',
  vectorType: 'sparse',
  spec: {
    serverless: {
      cloud: 'aws',
      region: 'us-east-1',
    },
  },
});

// upsert sparse vectors to the index
const index = pc.index('sample-index');

const sparseVectors = [
  {
    id: '1',
    sparseValues: { indices: [0, 1], values: [0.236, 0.34] },
  },
  {
    id: '2',
    sparseValues: { indices: [0, 1], values: [0.345, 0.98] },
  },
];

await index.upsertVectors(sparseVectors);
Assistant support

Support has been added for working with Pinecone Assistants. Pinecone Assistant is a service that allows you to upload documents, ask questions, and receive responses that reference your documents. This is known as retrieval-augmented generation (RAG).

const pc = new Pinecone();

// create an assistant
await pc.createAssistant({
  name: 'test-assistant',
  instructions: 'respond to queries in english',
  region: 'us',
  metadata: { key: 'value' },
});

const assistant = pc.assistant('test-assistant');

// upload a file to the assistant
const file = await assistant.uploadFile({
  path: '/local/path/to/file.pdf',
  metadata: { key: 'value' },
});

// check on the status of the file
const fileStatus = await assistant.describeFile(file.id);
console.log(fileStatus.percentDone);

// chat with the assistant
const stream = await assistant.chatStream({
  messages: [{ role: 'user', content: 'What is the capital of France?' }],
});

// stream the response
for await (const chunk of stream) {
  if (chunk.type === 'content_chunk') {
    process.stdout.write(chunk.delta.content || '');
  }
}
});

What's Changed

Full Changelog: pinecone-io/pinecone-ts-client@4.1.0...v5.0.0


Configuration

📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - "after 9am and before 5pm every weekday" (UTC).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot requested a review from alexolivier February 24, 2025 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants