Skip to content
Snippets Groups Projects
Unverified Commit 36fb6183 authored by Siraj R Aizlewood's avatar Siraj R Aizlewood
Browse files

Linting.

parent 19037308
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,10 @@ import os
from typing import List, Optional
import cohere
from cohere.types.embed_response import EmbedResponse_EmbeddingsFloats, EmbedResponse_EmbeddingsByType
from cohere.types.embed_response import (
EmbedResponse_EmbeddingsFloats,
EmbedResponse_EmbeddingsByType,
)
from semantic_router.encoders import BaseEncoder
from semantic_router.utils.defaults import EncoderDefault
......@@ -50,7 +53,9 @@ class CohereEncoder(BaseEncoder):
if isinstance(embeds, EmbedResponse_EmbeddingsFloats):
return embeds.embeddings
elif isinstance(embeds, EmbedResponse_EmbeddingsByType):
raise NotImplementedError("Handling of EmbedByTypeResponseEmbeddings is not implemented.")
raise NotImplementedError(
"Handling of EmbedByTypeResponseEmbeddings is not implemented."
)
else:
raise ValueError("Unexpected response type from Cohere API")
except Exception as e:
......
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