Skip to content
Snippets Groups Projects
Commit 5a8091ff authored by Billy Trend's avatar Billy Trend
Browse files

Fix types

parent c3fa297b
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ license = "MIT" ...@@ -11,7 +11,7 @@ license = "MIT"
python = ">=3.9,<3.13" python = ">=3.9,<3.13"
pydantic = "^2.5.3" pydantic = "^2.5.3"
openai = ">=1.10.0,<2.0.0" openai = ">=1.10.0,<2.0.0"
cohere = ">=5.00,<6.00" cohere = ">=5.9.4,<6.00"
mistralai= {version = ">=0.0.12,<0.1.0", optional = true} mistralai= {version = ">=0.0.12,<0.1.0", optional = true}
numpy = "^1.25.2" numpy = "^1.25.2"
colorlog = "^6.8.0" colorlog = "^6.8.0"
......
...@@ -2,7 +2,7 @@ import os ...@@ -2,7 +2,7 @@ import os
from typing import List, Optional from typing import List, Optional
import cohere import cohere
from cohere.types.embed_response import EmbedResponse_EmbeddingsByType from cohere.types.embed_response import EmbeddingsByTypeEmbedResponse
from semantic_router.encoders import BaseEncoder from semantic_router.encoders import BaseEncoder
from semantic_router.utils.defaults import EncoderDefault from semantic_router.utils.defaults import EncoderDefault
...@@ -46,7 +46,7 @@ class CohereEncoder(BaseEncoder): ...@@ -46,7 +46,7 @@ class CohereEncoder(BaseEncoder):
texts=docs, input_type=self.input_type, model=self.name texts=docs, input_type=self.input_type, model=self.name
) )
# Check for unsupported type. # Check for unsupported type.
if isinstance(embeds, EmbedResponse_EmbeddingsByType): if isinstance(embeds, EmbeddingsByTypeEmbedResponse):
raise NotImplementedError( raise NotImplementedError(
"Handling of EmbedByTypeResponseEmbeddings is not implemented." "Handling of EmbedByTypeResponseEmbeddings is not implemented."
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment