Skip to content

Commit

Permalink
fixing types
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsbatista committed Dec 16, 2024
1 parent 2df40c3 commit 0492025
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions haystack/components/preprocessors/recursive_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import re
from copy import deepcopy
from typing import Dict, List, Optional
from typing import Any, Dict, List, Optional

from haystack import Document, component, logging

Expand Down Expand Up @@ -56,7 +56,7 @@ def __init__( # pylint: disable=too-many-positional-arguments
split_length: int = 200,
split_overlap: int = 0,
separators: Optional[List[str]] = None,
sentence_splitter_params: Optional[Dict[str, str]] = None,
sentence_splitter_params: Optional[Dict[str, Any]] = None,
):
"""
Initializes a RecursiveDocumentSplitter.
Expand Down Expand Up @@ -91,7 +91,7 @@ def _check_params(self):
raise ValueError("All separators must be strings.")

@staticmethod
def _get_custom_sentence_tokenizer(sentence_splitter_params: Dict[str, str]):
def _get_custom_sentence_tokenizer(sentence_splitter_params: Dict[str, Any]):
from haystack.components.preprocessors.sentence_tokenizer import SentenceSplitter

return SentenceSplitter(**sentence_splitter_params)
Expand Down

0 comments on commit 0492025

Please sign in to comment.