Skip to content

Commit

Permalink
Throw when trying to rerank with v1 (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
billytrend-cohere authored Dec 4, 2024
1 parent 36d0e18 commit 9fe3df8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cohere/bedrock_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def __init__(
timeout=timeout,
)

def rerank(self, *, query, documents, model = ..., top_n = ..., rank_fields = ..., return_documents = ..., max_chunks_per_doc = ..., request_options = None):
raise NotImplementedError("Please use cohere.BedrockClientV2 instead: method rerank is not available in the v1 client, cohere.BedrockClient.")

class BedrockClientV2(AwsClientV2):
def __init__(
Expand Down

0 comments on commit 9fe3df8

Please sign in to comment.