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

Generate code based on 2025-01 api spec #171

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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.
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.

3 participants