Skip to content

Commit

Permalink
Removing marshmallow-jsonschema
Browse files Browse the repository at this point in the history
  • Loading branch information
diptanu committed Feb 4, 2024
1 parent 1a7aa16 commit 36aba4a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions crates/indexify_internal_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ impl From<ContentMetadata> for indexify_coordinator::ContentMetadata {
}

// FIXME - Make this visible to only tests
#[cfg(test)]
impl Default for ContentMetadata {
fn default() -> Self {
Self {
Expand Down
4 changes: 2 additions & 2 deletions indexify_extractor_sdk/base_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@dataclass
class EmbeddingInputParams:
overlap: int = 0
chunk_size: int = 0
chunk_size: int = 100
text_splitter: str = "recursive"


Expand All @@ -25,7 +25,7 @@ class BaseEmbeddingExtractor(Extractor):
def __init__(self, max_context_length: int):
self._model_context_length: int = max_context_length

def extract(self, content: Content, params: EmbeddingInputParams) -> List[Content]:
def extract(self, content: Content, params: EmbeddingInputParams=EmbeddingInputParams()) -> List[Content]:
if params.chunk_size == 0:
params.chunk_size = self._model_context_length
splitter: Callable[[str], List[str]] = self._create_splitter(params)
Expand Down
4 changes: 2 additions & 2 deletions indexify_extractor_sdk/base_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from dataclasses import dataclass, field
from dataclasses_json import dataclass_json
from marshmallow_jsonschema import JSONSchema

@dataclass_json
@dataclass
Expand Down Expand Up @@ -143,7 +142,8 @@ def describe(self, input_params = None) -> ExtractorDescription:
json_schema = {}
json_schema["additionalProperties"] = False
if self._param_cls and callable(getattr(self._param_cls, "schema", None)):
json_schema = JSONSchema().dump(self._param_cls.schema())
# FIXME Construct the JSON Schema of the input params
json_schema = {}
for content in out_c:
for feature in content.features:
if feature.feature_type == "embedding":
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"transformers",
"dataclasses-json",
"marshmallow",
"marshmallow-jsonschema",
]

# What packages are optional?
Expand Down

0 comments on commit 36aba4a

Please sign in to comment.