Skip to content

Commit

Permalink
type fixes for linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescalam committed Apr 27, 2024
1 parent 78857b5 commit ceb67ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions semantic_router/encoders/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List
from typing import Any, List

from pydantic.v1 import BaseModel, Field

Expand All @@ -11,5 +11,5 @@ class BaseEncoder(BaseModel):
class Config:
arbitrary_types_allowed = True

def __call__(self, docs: List[str]) -> List[List[float]]:
def __call__(self, docs: List[Any]) -> List[List[float]]:
raise NotImplementedError("Subclasses must implement this method")
2 changes: 1 addition & 1 deletion semantic_router/index/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class BaseIndex(BaseModel):
type: str = "base"

def add(
self, embeddings: List[List[float]], routes: List[str], utterances: List[str]
self, embeddings: List[List[float]], routes: List[str], utterances: List[Any]
):
"""
Add embeddings to the index.
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def test_query_filter_pinecone(self, openai_encoder, routes, index_cls):
route_layer(text="Hello", route_filter=["Route 8"]).name
except ValueError:
assert True

# delete index
pineconeindex.delete_index()

Expand Down

0 comments on commit ceb67ce

Please sign in to comment.