From 5e5e46f878a0cd5311c3838734d2025e7684a20e Mon Sep 17 00:00:00 2001 From: Hassieb Pakzad <68423100+hassiebp@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:53:16 +0100 Subject: [PATCH] fix(client): link dataset item positional arg --- langfuse/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langfuse/client.py b/langfuse/client.py index 76d840e0..cbcab973 100644 --- a/langfuse/client.py +++ b/langfuse/client.py @@ -3178,22 +3178,22 @@ def flush(self, observation: StatefulClient, run_name: str): def link( self, + trace_or_observation: typing.Union[StatefulClient, str, None], run_name: str, run_metadata: Optional[Any] = None, run_description: Optional[str] = None, trace_id: Optional[str] = None, observation_id: Optional[str] = None, - trace_or_observation: typing.Union[StatefulClient, str, None] = None, ): """Link the dataset item to observation within a specific dataset run. Creates a dataset run item. Args: + trace_or_observation (Union[StatefulClient, str, None]): The trace or observation object to link. Deprecated: can also be an observation ID. run_name (str): The name of the dataset run. run_metadata (Optional[Any]): Additional metadata to include in dataset run. run_description (Optional[str]): Description of the dataset run. trace_id (Optional[str]): The trace ID to link to the dataset item. Set trace_or_observation to None if trace_id is provided. observation_id (Optional[str]): The observation ID to link to the dataset item (optional). Set trace_or_observation to None if trace_id is provided. - trace_or_observation (Union[StatefulClient, str, None]): The trace or observation object to link. Deprecated: can also be an observation ID. """ parsed_trace_id: str = None parsed_observation_id: str = None