From c592a0e0a8c5b3060c4e9c339e3d3feae13c21ea Mon Sep 17 00:00:00 2001 From: James Briggs <james.briggs@hotmail.com> Date: Wed, 15 May 2024 11:30:17 +0800 Subject: [PATCH] chore: update message and stacklevel --- semantic_router/splitters/consecutive_sim.py | 5 +++-- semantic_router/splitters/cumulative_sim.py | 5 +++-- semantic_router/splitters/rolling_window.py | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/semantic_router/splitters/consecutive_sim.py b/semantic_router/splitters/consecutive_sim.py index 491860ec..5c20d779 100644 --- a/semantic_router/splitters/consecutive_sim.py +++ b/semantic_router/splitters/consecutive_sim.py @@ -21,9 +21,10 @@ class ConsecutiveSimSplitter(BaseSplitter): ): warn( "Splitters are being deprecated. They have moved to their own " - "package. Please install the `semantic-chunkers` package. More " + "package. Please migrate to the `semantic-chunkers` package. More " "information can be found at:\n" - "https://github.com/aurelio-ai/semantic-chunkers" + "https://github.com/aurelio-ai/semantic-chunkers", + stacklevel=2, ) super().__init__(name=name, encoder=encoder) encoder.score_threshold = score_threshold diff --git a/semantic_router/splitters/cumulative_sim.py b/semantic_router/splitters/cumulative_sim.py index f10a6407..f0fbd8e8 100644 --- a/semantic_router/splitters/cumulative_sim.py +++ b/semantic_router/splitters/cumulative_sim.py @@ -22,9 +22,10 @@ class CumulativeSimSplitter(BaseSplitter): ): warn( "Splitters are being deprecated. They have moved to their own " - "package. Please install the `semantic-chunkers` package. More " + "package. Please migrate to the `semantic-chunkers` package. More " "information can be found at:\n" - "https://github.com/aurelio-ai/semantic-chunkers" + "https://github.com/aurelio-ai/semantic-chunkers", + stacklevel=2, ) super().__init__(name=name, encoder=encoder) encoder.score_threshold = score_threshold diff --git a/semantic_router/splitters/rolling_window.py b/semantic_router/splitters/rolling_window.py index 05978911..5911882d 100644 --- a/semantic_router/splitters/rolling_window.py +++ b/semantic_router/splitters/rolling_window.py @@ -52,9 +52,10 @@ class RollingWindowSplitter(BaseSplitter): ): warn( "Splitters are being deprecated. They have moved to their own " - "package. Please install the `semantic-chunkers` package. More " + "package. Please migrate to the `semantic-chunkers` package. More " "information can be found at:\n" - "https://github.com/aurelio-ai/semantic-chunkers" + "https://github.com/aurelio-ai/semantic-chunkers", + stacklevel=2, ) super().__init__(name=name, encoder=encoder) self.calculated_threshold: float -- GitLab