refactor chunking and embedding into their own modules
This commit is contained in:
+2
-2
@@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
from chromy.embed import embed
|
||||
from chromy.embedding import embed
|
||||
|
||||
|
||||
class EmbedTest(unittest.TestCase):
|
||||
@@ -12,7 +12,7 @@ class EmbedTest(unittest.TestCase):
|
||||
|
||||
def test_embed_pairs_text_with_list_embeddings(self) -> None:
|
||||
with patch(
|
||||
"chromy.embed.DefaultEmbeddingFunction",
|
||||
"chromy.embedding.service.DefaultEmbeddingFunction",
|
||||
return_value=lambda chunks: ((1.0, 2.0), (3.0, 4.0)),
|
||||
):
|
||||
result = embed(["first", "second"])
|
||||
|
||||
Reference in New Issue
Block a user