Skip to content

Commit

Permalink
Added cohere under dependencies in pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
AnushreeBannadabhavi committed Mar 31, 2024
1 parent f94f0bf commit 7fbe9bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions haystack/components/rankers/cohere.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from typing import Any, Dict, List, Optional

import cohere

from haystack import Document, component, default_from_dict, default_to_dict, logging
from haystack.lazy_imports import LazyImport
from haystack.utils import Secret, deserialize_secrets_inplace

logger = logging.getLogger(__name__)

with LazyImport(message="Run 'pip install \"cohere==5.1.7\"'") as cohere_import:
import cohere


@component
class CohereRanker:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies = [
"requests",
"numpy",
"python-dateutil",
"cohere==5.1.7", # CohereRanker
]

[tool.hatch.envs.default]
Expand Down Expand Up @@ -106,7 +107,6 @@ extra-dependencies = [
"spacy>=3.7,<3.8", # NamedEntityExtractor
"spacy-curated-transformers>=0.2,<=0.3", # NamedEntityExtractor
"en-core-web-trf @ https://github.com/explosion/spacy-models/releases/download/en_core_web_trf-3.7.3/en_core_web_trf-3.7.3-py3-none-any.whl", # NamedEntityExtractor
"cohere==5.1.7", # CohereRanker

# Converters
"pypdf", # PyPDFConverter
Expand Down

0 comments on commit 7fbe9bf

Please sign in to comment.