Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ models = pc.inference.list_models(type="rerank", vector_type="dense")
Or, if you know the name of a model, you can get just those details

```
pc.inference.get_model(model_name='pinecone-rerank-v0')
pc.inference.get_model(model_name='bge-reranker-v2-m3')
# {
# "model": "pinecone-rerank-v0",
# "model": "bge-reranker-v2-m3",
# "short_description": "A state of the art reranking model that out-performs competitors on widely accepted benchmarks. It can handle chunks up to 512 tokens (1-2 paragraphs)",
# "type": "rerank",
# "supported_parameters": [
Expand Down
8 changes: 4 additions & 4 deletions pinecone/inference/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def rerank(

pc = Pinecone()
result = pc.inference.rerank(
model="pinecone-rerank-v0",
model="bge-reranker-v2-m3",
query="What is machine learning?",
documents=[
{"text": "Machine learning is a subset of AI.", "category": "tech"},
Expand All @@ -326,7 +326,7 @@ def rerank(

pc = Pinecone()
result = pc.inference.rerank(
model=RerankModel.PINECONE_RERANK_V0,
model=RerankModel.Bge_Reranker_V2_M3,
query="Your query here",
documents=["doc1", "doc2", "doc3"]
)
Expand Down Expand Up @@ -399,10 +399,10 @@ def get_model(self, model_name: str) -> "ModelInfo":
from pinecone import Pinecone

pc = Pinecone()
model_info = pc.inference.get_model(model_name="pinecone-rerank-v0")
model_info = pc.inference.get_model(model_name="bge-reranker-v2-m3")
print(model_info)
# {
# "model": "pinecone-rerank-v0",
# "model": "bge-reranker-v2-m3",
# "short_description": "A state of the art reranking model that out-performs competitors on widely accepted benchmarks. It can handle chunks up to 512 tokens (1-2 paragraphs)",
# "type": "rerank",
# "supported_parameters": [
Expand Down
4 changes: 2 additions & 2 deletions pinecone/inference/inference_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ async def main():
async def main():
async with PineconeAsyncio() as pc:
result = await pc.inference.rerank(
model="pinecone-rerank-v0",
model="bge-reranker-v2-m3",
query="What is machine learning?",
documents=[
{"text": "Machine learning is a subset of AI.", "category": "tech"},
Expand All @@ -288,7 +288,7 @@ async def main():
async def main():
async with PineconeAsyncio() as pc:
result = await pc.inference.rerank(
model=RerankModel.PINECONE_RERANK_V0,
model=RerankModel.Bge_Reranker_V2_M3,
query="Your query here",
documents=["doc1", "doc2", "doc3"]
)
Expand Down
2 changes: 0 additions & 2 deletions pinecone/inference/inference_request_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ class EmbedModel(Enum):

class RerankModel(Enum):
Bge_Reranker_V2_M3 = "bge-reranker-v2-m3"
Cohere_Rerank_3_5 = "cohere-rerank-3.5"
Pinecone_Rerank_V0 = "pinecone-rerank-v0"


class InferenceRequestBuilder:
Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ exclude = [

line-length = 100
indent-width = 4
target-version = "8.0.0"
target-version = "py310"

[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
Expand Down Expand Up @@ -156,7 +156,3 @@ docstring-code-line-length = "dynamic"

# E712 Allow == comparison to True/False
"tests/**" = ["E712"]

[tool.black]
line-length = 100
target-version = ["py310"]
Loading