@@ -1786,7 +1786,9 @@ def create_score(
17861786 trace_id : Optional [str ] = None ,
17871787 score_id : Optional [str ] = None ,
17881788 observation_id : Optional [str ] = None ,
1789- data_type : Optional [Literal ["CATEGORICAL" , "TEXT" ]] = "CATEGORICAL" ,
1789+ data_type : Optional [
1790+ Literal ["CATEGORICAL" , "TEXT" , "CORRECTION" ]
1791+ ] = "CATEGORICAL" ,
17901792 comment : Optional [str ] = None ,
17911793 config_id : Optional [str ] = None ,
17921794 metadata : Optional [Any ] = None ,
@@ -1816,13 +1818,13 @@ def create_score(
18161818
18171819 Args:
18181820 name: Name of the score (e.g., "relevance", "accuracy")
1819- value: Score value (can be numeric for NUMERIC/BOOLEAN types or string for CATEGORICAL/TEXT)
1821+ value: Score value (can be numeric for NUMERIC/BOOLEAN types or string for CATEGORICAL/TEXT/CORRECTION )
18201822 session_id: ID of the Langfuse session to associate the score with
18211823 dataset_run_id: ID of the Langfuse dataset run to associate the score with
18221824 trace_id: ID of the Langfuse trace to associate the score with
18231825 observation_id: Optional ID of the specific observation to score. Trace ID must be provided too.
18241826 score_id: Optional custom ID for the score (auto-generated if not provided)
1825- data_type: Type of score (NUMERIC, BOOLEAN, CATEGORICAL, or TEXT )
1827+ data_type: Type of score (NUMERIC, BOOLEAN, CATEGORICAL, TEXT, or CORRECTION )
18261828 comment: Optional comment or explanation for the score
18271829 config_id: Optional ID of a score config defined in Langfuse
18281830 metadata: Optional metadata to be attached to the score
@@ -1946,7 +1948,9 @@ def score_current_span(
19461948 name : str ,
19471949 value : str ,
19481950 score_id : Optional [str ] = None ,
1949- data_type : Optional [Literal ["CATEGORICAL" , "TEXT" ]] = "CATEGORICAL" ,
1951+ data_type : Optional [
1952+ Literal ["CATEGORICAL" , "TEXT" , "CORRECTION" ]
1953+ ] = "CATEGORICAL" ,
19501954 comment : Optional [str ] = None ,
19511955 config_id : Optional [str ] = None ,
19521956 metadata : Optional [Any ] = None ,
@@ -1970,9 +1974,9 @@ def score_current_span(
19701974
19711975 Args:
19721976 name: Name of the score (e.g., "relevance", "accuracy")
1973- value: Score value (can be numeric for NUMERIC/BOOLEAN types or string for CATEGORICAL/TEXT)
1977+ value: Score value (can be numeric for NUMERIC/BOOLEAN types or string for CATEGORICAL/TEXT/CORRECTION )
19741978 score_id: Optional custom ID for the score (auto-generated if not provided)
1975- data_type: Type of score (NUMERIC, BOOLEAN, CATEGORICAL, or TEXT )
1979+ data_type: Type of score (NUMERIC, BOOLEAN, CATEGORICAL, TEXT, or CORRECTION )
19761980 comment: Optional comment or explanation for the score
19771981 config_id: Optional ID of a score config defined in Langfuse
19781982 metadata: Optional metadata to be attached to the score
@@ -2010,7 +2014,7 @@ def score_current_span(
20102014 name = name ,
20112015 value = cast (str , value ),
20122016 score_id = score_id ,
2013- data_type = cast (Literal ["CATEGORICAL" , "TEXT" ], data_type ),
2017+ data_type = cast (Literal ["CATEGORICAL" , "TEXT" , "CORRECTION" ], data_type ),
20142018 comment = comment ,
20152019 config_id = config_id ,
20162020 metadata = metadata ,
@@ -2036,7 +2040,9 @@ def score_current_trace(
20362040 name : str ,
20372041 value : str ,
20382042 score_id : Optional [str ] = None ,
2039- data_type : Optional [Literal ["CATEGORICAL" , "TEXT" ]] = "CATEGORICAL" ,
2043+ data_type : Optional [
2044+ Literal ["CATEGORICAL" , "TEXT" , "CORRECTION" ]
2045+ ] = "CATEGORICAL" ,
20402046 comment : Optional [str ] = None ,
20412047 config_id : Optional [str ] = None ,
20422048 metadata : Optional [Any ] = None ,
@@ -2061,9 +2067,9 @@ def score_current_trace(
20612067
20622068 Args:
20632069 name: Name of the score (e.g., "user_satisfaction", "overall_quality")
2064- value: Score value (can be numeric for NUMERIC/BOOLEAN types or string for CATEGORICAL/TEXT)
2070+ value: Score value (can be numeric for NUMERIC/BOOLEAN types or string for CATEGORICAL/TEXT/CORRECTION )
20652071 score_id: Optional custom ID for the score (auto-generated if not provided)
2066- data_type: Type of score (NUMERIC, BOOLEAN, CATEGORICAL, or TEXT )
2072+ data_type: Type of score (NUMERIC, BOOLEAN, CATEGORICAL, TEXT, or CORRECTION )
20672073 comment: Optional comment or explanation for the score
20682074 config_id: Optional ID of a score config defined in Langfuse
20692075 metadata: Optional metadata to be attached to the score
@@ -2099,7 +2105,7 @@ def score_current_trace(
20992105 name = name ,
21002106 value = cast (str , value ),
21012107 score_id = score_id ,
2102- data_type = cast (Literal ["CATEGORICAL" , "TEXT" ], data_type ),
2108+ data_type = cast (Literal ["CATEGORICAL" , "TEXT" , "CORRECTION" ], data_type ),
21032109 comment = comment ,
21042110 config_id = config_id ,
21052111 metadata = metadata ,
0 commit comments