Skip to content

Commit

Permalink
rag: add missing logger file (livekit#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom authored Aug 3, 2024
1 parent 9a72ccc commit 88e75d7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/wet-crabs-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-plugins-rag": patch
---

rag: add missing logger file
2 changes: 2 additions & 0 deletions .github/workflows/check-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
./livekit-plugins/livekit-plugins-silero \
./livekit-plugins/livekit-plugins-elevenlabs \
./livekit-plugins/livekit-plugins-cartesia \
./livekit-plugins/livekit-plugins-rag \
./livekit-plugins/livekit-plugins-azure
- name: Install stub packages
Expand All @@ -65,4 +66,5 @@ jobs:
-p livekit.plugins.silero \
-p livekit.plugins.elevenlabs \
-p livekit.plugins.cartesia \
-p livekit.plugins.rag \
-p livekit.plugins.azure
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def __init__(
def chunk(self, *, text: str) -> list[str]:
chunks = []

buf_words = []
buf_words: list[str] = []
for paragraph in self._paragraph_tokenizer(text):
last_buf_words = []
last_buf_words: list[str] = []

for sentence in self._sentence_tokenizer.tokenize(text=paragraph):
for word in self._word_tokenizer.tokenize(text=sentence):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import logging

logger = logging.getLogger("livekit.plugins.rag")

0 comments on commit 88e75d7

Please sign in to comment.