Skip to content

Conversation

@rohanshah18
Copy link
Contributor

@rohanshah18 rohanshah18 commented Jan 10, 2025

Problem

Generate code based on the 2025-01 api spec

Solution

The following changes have been made to ensure compatibility with the generated code using the 2025-01 API specification:

  1. /embed:
    1. argument parameters now accepts Map<String, Object> instead of EmbedRequestParameters
    2. the response class Embeddings has dense and sparse embeddings, so the integration test was updated to get dense embedding values: embeddings.getData().get(0).getValues().size() -> embeddings.getData().get(0).getDenseEmbedding().getValues().size()
  2. /rerank:
    1. argument documents now accepts List<Map<String, Object>> instead of List<Map<String, String>>
    2. argument parameters now accepts Map<String, Object> instead of Map<String, String>
  3. Unit tests: Added "vector_type": "dense" to the json payload for most of the json files used in the following unit tests:
    1. JsonParsingTest
    2. PineconeBuilderTest
    3. PineconeIndexOperationsTest

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Updated unit and integration tests

@rohanshah18 rohanshah18 marked this pull request as ready for review January 10, 2025 20:00
… the protos (#174)

## Problem

The code generation using proto file was done using protoc and the
process was manual.

## Solution

Added a script to generate java classes using
[buf](https://buf.build/docs/generate/overview/).

## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Infrastructure change (CI configs, etc)
- [ ] Non-code change (docs, etc)
- [ ] None of the above: (explain here)

## Test Plan

Integration tests should run successfully.
## Problem

Add support to create sparse serverless index method

## Solution

As a part of this PR, added following changes:
1. add createSparseServelessIndex() that doesn't accept dimension and
metric as compared to the traditional createServerlessIndex()
2. removed a validation to check for values (part of vector) being null
or empty at the time of upsert since values can be an empty array of
floats for sparse vector
3. metric is now optional for creating serverless index and will default
to cosine for dense index
4. added integration tests

## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Infrastructure change (CI configs, etc)
- [ ] Non-code change (docs, etc)
- [ ] None of the above: (explain here)

## Test Plan

Added integration tests
## Problem

Prepare to release Java SDK v4.0.0.

## Solution

Releasing a major version requires updating:
1. README
2. gradle.properties
3. CHANGELOG.md
4. Constants.java


## Type of Change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Infrastructure change (CI configs, etc)
- [X] Non-code change (docs, etc)
- [ ] None of the above: (explain here)

## Test Plan

NA
@rohanshah18 rohanshah18 merged commit 902f148 into main Feb 3, 2025
9 checks passed
@rohanshah18 rohanshah18 deleted the rshah/release-candidate/2025-01 branch February 3, 2025 19:18
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.

4 participants