This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Integrate Cohere re-ranking API#63877
Merged
Merged
Conversation
janhartman
reviewed
Jul 17, 2024
| "reranker" : { | ||
| "description": "Reranker to use for rankContext requests", | ||
| "type": "object", | ||
| "properties": { |
Contributor
There was a problem hiding this comment.
Can we make this a bit more futureproof? I'd add a string corresponding to the CodyReranker type here and then use that one so we don't rely on behavior like what's described below.
Contributor
Author
There was a problem hiding this comment.
Yeah, I'm actually changing this to allow specifying the model too, thank you for quick turnaround on PR review ;)
Contributor
Author
There was a problem hiding this comment.
And, to comment on your specific concern, it'd be ideal to do something like oneOf in Protocol buffers instead of having 2 properties that need to be set in sync - I'll see if that's possible using JSON schema
added 2 commits
July 17, 2024 15:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrates Cohere re-ranking API for server-side Cody Context (RFC 969).
Before this PR, we only supported
identityranker (which returned all items in the input order), which is still the default choice (when Cohere API key is not provided).Closes https://linear.app/sourcegraph/issue/AI-134/add-non-poc-ranking
Test plan
to test locally