Skip to content

Commit

Permalink
fix: migrating out conversations from Kura
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanleomk committed Jan 19, 2025
1 parent 8cbf4a1 commit dcb66c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions kura/cli/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ async def analyse_conversations(conversation_data: ConversationData):
checkpoint_dir=str(
Path(os.path.abspath(os.environ["KURA_CHECKPOINT_DIR"]))
),
conversations=conversations,
)
await kura.cluster_conversations()
clusters = await kura.cluster_conversations(conversations)

with open(clusters_file) as f:
clusters_data = []
Expand Down
4 changes: 1 addition & 3 deletions kura/kura.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
class Kura:
def __init__(
self,
conversations: list[Conversation] = [],
embedding_model: BaseEmbeddingModel = OpenAIEmbeddingModel(),
summarisation_model: BaseSummaryModel = SummaryModel(),
cluster_model: BaseClusterModel = ClusterModel(),
Expand All @@ -43,7 +42,6 @@ def __init__(
self.embedding_model = embedding_model
self.embedding_model = embedding_model
self.summarisation_model = summarisation_model
self.conversations = conversations
self.max_clusters = max_clusters
self.cluster_model = cluster_model
self.meta_cluster_model = meta_cluster_model
Expand All @@ -69,7 +67,7 @@ def __init__(
os.makedirs(self.checkpoint_dir)

def load_checkpoint(
self, checkpoint_path: str, response_model: T
self, checkpoint_path: str, response_model: type[T]
) -> Union[list[T], None]:
if not self.disable_checkpoints:
if os.path.exists(checkpoint_path):
Expand Down

0 comments on commit dcb66c7

Please sign in to comment.