From 21123ca66403d205185fbf0bd255248eeb5b78da Mon Sep 17 00:00:00 2001 From: Max Deichmann Date: Mon, 25 Sep 2023 15:01:17 -0700 Subject: [PATCH] rename --- langfuse/client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/langfuse/client.py b/langfuse/client.py index 2ad7b943..6a8e6d11 100644 --- a/langfuse/client.py +++ b/langfuse/client.py @@ -107,12 +107,12 @@ def get_dataset(self, name: str): self.log.debug(f"Getting datasets {name}") dataset = self.client.datasets.get(dataset_name=name) - items = [FunctionalDatasetItem(**i.dict()) for i in dataset.items] + items = [DatasetItemClient(i) for i in dataset.items] body = dataset.dict() del body["items"] - return FunctionalDataset(**body, items=items) + return DatasetClient(**body, items=items) except Exception as e: self.log.exception(e) raise e @@ -523,7 +523,7 @@ def getNewHandler(self): return CallbackHandler(statefulTraceClient=self) -class FunctionalDatasetItem(DatasetItem): +class DatasetItemClient(DatasetItem): def link(self, observation: StatefulClient, run_name: str): # flush the queue before creating the dataset run item # to ensure that all events are persistet. @@ -535,6 +535,6 @@ def link(self, observation: StatefulClient, run_name: str): ) -class FunctionalDataset(Dataset): - items: typing.List[FunctionalDatasetItem] +class DatasetClient(Dataset): + items: typing.List[DatasetItemClient] __fields__ = {name: field for name, field in Dataset.__fields__.items()}