Skip to content

Conversation

@rohanshah18
Copy link
Contributor

Problem

Update the datatype of parameters in rerank() from Map<String, Object> to Map<String, String> to better match the OAS.

Solution

Updated the datatype for the rerank() so the base overloaded method is now:

public RerankResult rerank(String model,
                               String query,
                               List<Map<String, String>> documents,
                               List<String> rankFields,
                               int topN,
                               boolean returnDocuments,
                               Map<String, String> parameters)

As a part of this change, I have also updated the integration test and README.

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 the integration test for rerank and the rest of them should run as it is.

@rohanshah18 rohanshah18 requested a review from ssmith-pc October 23, 2024 22:35
@rohanshah18 rohanshah18 marked this pull request as ready for review October 23, 2024 22:42
@rohanshah18 rohanshah18 merged commit e2d0996 into rshah/release-candidate/2024-10 Oct 23, 2024
6 of 7 checks passed
@rohanshah18 rohanshah18 deleted the rshah/updateRerank branch October 23, 2024 23:16
rohanshah18 added a commit that referenced this pull request Oct 24, 2024
## Problem

Update the datatype of `parameters` in `rerank()` from `Map<String,
Object>` to `Map<String, String>` to better match the OAS.

## Solution

Updated the datatype for the rerank() so the base overloaded method is
now:
```java
public RerankResult rerank(String model,
                               String query,
                               List<Map<String, String>> documents,
                               List<String> rankFields,
                               int topN,
                               boolean returnDocuments,
                               Map<String, String> parameters)
``` 
As a part of this change, I have also updated the integration test and
README.

## Type of Change

- [X] 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 the integration test for rerank and the rest of them should run
as it is.
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