Skip to content
Snippets Groups Projects
Unverified Commit ceb67ceb authored by James Briggs's avatar James Briggs
Browse files

type fixes for linter

parent 78857b54
No related branches found
No related tags found
No related merge requests found
from typing import List from typing import Any, List
from pydantic.v1 import BaseModel, Field from pydantic.v1 import BaseModel, Field
...@@ -11,5 +11,5 @@ class BaseEncoder(BaseModel): ...@@ -11,5 +11,5 @@ class BaseEncoder(BaseModel):
class Config: class Config:
arbitrary_types_allowed = True 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") raise NotImplementedError("Subclasses must implement this method")
...@@ -20,7 +20,7 @@ class BaseIndex(BaseModel): ...@@ -20,7 +20,7 @@ class BaseIndex(BaseModel):
type: str = "base" type: str = "base"
def add( 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. Add embeddings to the index.
......
...@@ -289,7 +289,7 @@ class TestRouteLayer: ...@@ -289,7 +289,7 @@ class TestRouteLayer:
route_layer(text="Hello", route_filter=["Route 8"]).name route_layer(text="Hello", route_filter=["Route 8"]).name
except ValueError: except ValueError:
assert True assert True
# delete index # delete index
pineconeindex.delete_index() pineconeindex.delete_index()
......
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