Skip to content

Commit

Permalink
edit example in rerank docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
aviolante committed Aug 29, 2024
1 parent b78aa68 commit 8d73f3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/ai-endpoints/langchain_nvidia_ai_endpoints/reranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ def __init__(self, **kwargs: Any):
]
>>> client = NVIDIARerank(
model="nvidia/nv-rerankqa-mistral-4b-v3",
api_key="$API_KEY_REQUIRED_IF_EXECUTING_OUTSIDE_NGC"
model="nvidia/nv-rerankqa-mistral-4b-v3",
api_key="$API_KEY_REQUIRED_IF_EXECUTING_OUTSIDE_NGC"
)
>>> response = client.compress_documents(
query=query,
documents=[Document(page_content=passage) for passage in passages]
query=query,
documents=[Document(page_content=passage) for passage in passages]
)
>>> print(f"Most relevant: {response[0].page_content}\n"
Expand Down

0 comments on commit 8d73f3b

Please sign in to comment.