From 08714562ad96119857f570f254655c2738059ca5 Mon Sep 17 00:00:00 2001 From: Shreya Shankar Date: Thu, 22 Aug 2024 12:16:13 -0700 Subject: [PATCH] Decompose split into split and gather --- motion/operations/gather.py | 1 + motion/operations/resolve.py | 3 +-- motion/operations/split.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/motion/operations/gather.py b/motion/operations/gather.py index e5622733..3bbeb464 100644 --- a/motion/operations/gather.py +++ b/motion/operations/gather.py @@ -1,4 +1,5 @@ from typing import Dict, List, Tuple + from motion.operations.base import BaseOperation diff --git a/motion/operations/resolve.py b/motion/operations/resolve.py index 08cefffd..f5bb6b22 100644 --- a/motion/operations/resolve.py +++ b/motion/operations/resolve.py @@ -7,7 +7,7 @@ import jinja2 from jinja2 import Template -from litellm import completion_cost +from litellm import completion_cost, embedding from sklearn.metrics.pairwise import cosine_similarity from motion.operations.base import BaseOperation @@ -18,7 +18,6 @@ rich_as_completed, validate_output, ) -from litellm import embedding def compare_pair( diff --git a/motion/operations/split.py b/motion/operations/split.py index e41264b3..e48d54ea 100644 --- a/motion/operations/split.py +++ b/motion/operations/split.py @@ -2,6 +2,7 @@ from typing import Dict, List, Tuple import tiktoken + from motion.operations.base import BaseOperation