Skip to content

Commit

Permalink
Throw when trying to rerank with v1
Browse files Browse the repository at this point in the history
  • Loading branch information
billytrend-cohere committed Dec 4, 2024
1 parent 36d0e18 commit d18390f
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 d18390f

Please sign in to comment.