diff --git a/langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type.py b/langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type.py index 52998e5e4..21bb6440f 100644 --- a/langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type.py +++ b/langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type.py @@ -8,15 +8,21 @@ class BlobStorageIntegrationFileType(enum.StrEnum): + """ + File format for exported data. `PARQUET` is a columnar binary format encoded and compressed by the storage engine; gzip compression does not apply to it. Note that the model-price columns (`input_price`, `output_price`, `total_price`) are not included in Parquet observation exports. + """ + JSON = "JSON" CSV = "CSV" JSONL = "JSONL" + PARQUET = "PARQUET" def visit( self, json: typing.Callable[[], T_Result], csv: typing.Callable[[], T_Result], jsonl: typing.Callable[[], T_Result], + parquet: typing.Callable[[], T_Result], ) -> T_Result: if self is BlobStorageIntegrationFileType.JSON: return json() @@ -24,3 +30,5 @@ def visit( return csv() if self is BlobStorageIntegrationFileType.JSONL: return jsonl() + if self is BlobStorageIntegrationFileType.PARQUET: + return parquet() diff --git a/langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type_response.py b/langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type_response.py index cfcafa5f3..57cc71969 100644 --- a/langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type_response.py +++ b/langfuse/api/blob_storage_integrations/types/blob_storage_integration_file_type_response.py @@ -9,7 +9,7 @@ class BlobStorageIntegrationFileTypeResponse(enum.StrEnum): """ - File type reported for an existing integration. Includes `PARQUET`, which a project may enable through the Langfuse UI but cannot yet be set via this API (the request `fileType` omits it). + File type reported for an existing integration. """ JSON = "JSON" diff --git a/langfuse/api/trace/client.py b/langfuse/api/trace/client.py index d3d7b760a..dabb625be 100644 --- a/langfuse/api/trace/client.py +++ b/langfuse/api/trace/client.py @@ -180,7 +180,7 @@ def list( ```json [ { - "type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "boolean", "null" + "type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "booleanObject", "boolean", "null" "column": string, // Required. Column to filter on (see available columns below) "operator": string, // Required. Operator based on type: // - datetime: ">", "<", ">=", "<=" @@ -191,10 +191,11 @@ def list( // - number: "=", ">", "<", ">=", "<=" // - stringObject: "=", "contains", "does not contain", "starts with", "ends with" // - numberObject: "=", ">", "<", ">=", "<=" + // - booleanObject: "=", "<>" // - boolean: "=", "<>" // - null: "is null", "is not null" "value": any, // Required (except for null type). Value to compare against. Type depends on filter type - "key": string // Required only for stringObject, numberObject, and categoryOptions types when filtering on nested fields like metadata + "key": string // Required only for stringObject, numberObject, booleanObject, and categoryOptions types when filtering on nested fields like metadata or score names } ] ``` @@ -237,6 +238,7 @@ def list( ### Scores (requires join with scores table) - `scores_avg` (number) - Average of numeric scores (alias: `scores`) - `score_categories` (categoryOptions) - Categorical score values + - `score_booleans` (booleanObject) - Boolean score values. Use `key` for the score name and a boolean `value`, e.g. `{"type": "booleanObject", "column": "score_booleans", "key": "is_correct", "operator": "=", "value": true}`. The `<>` operator also matches traces without a score of that name. ## Filter Examples ```json @@ -546,7 +548,7 @@ async def list( ```json [ { - "type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "boolean", "null" + "type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "booleanObject", "boolean", "null" "column": string, // Required. Column to filter on (see available columns below) "operator": string, // Required. Operator based on type: // - datetime: ">", "<", ">=", "<=" @@ -557,10 +559,11 @@ async def list( // - number: "=", ">", "<", ">=", "<=" // - stringObject: "=", "contains", "does not contain", "starts with", "ends with" // - numberObject: "=", ">", "<", ">=", "<=" + // - booleanObject: "=", "<>" // - boolean: "=", "<>" // - null: "is null", "is not null" "value": any, // Required (except for null type). Value to compare against. Type depends on filter type - "key": string // Required only for stringObject, numberObject, and categoryOptions types when filtering on nested fields like metadata + "key": string // Required only for stringObject, numberObject, booleanObject, and categoryOptions types when filtering on nested fields like metadata or score names } ] ``` @@ -603,6 +606,7 @@ async def list( ### Scores (requires join with scores table) - `scores_avg` (number) - Average of numeric scores (alias: `scores`) - `score_categories` (categoryOptions) - Categorical score values + - `score_booleans` (booleanObject) - Boolean score values. Use `key` for the score name and a boolean `value`, e.g. `{"type": "booleanObject", "column": "score_booleans", "key": "is_correct", "operator": "=", "value": true}`. The `<>` operator also matches traces without a score of that name. ## Filter Examples ```json diff --git a/langfuse/api/trace/raw_client.py b/langfuse/api/trace/raw_client.py index 9e3d47c68..6ba91c604 100644 --- a/langfuse/api/trace/raw_client.py +++ b/langfuse/api/trace/raw_client.py @@ -308,7 +308,7 @@ def list( ```json [ { - "type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "boolean", "null" + "type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "booleanObject", "boolean", "null" "column": string, // Required. Column to filter on (see available columns below) "operator": string, // Required. Operator based on type: // - datetime: ">", "<", ">=", "<=" @@ -319,10 +319,11 @@ def list( // - number: "=", ">", "<", ">=", "<=" // - stringObject: "=", "contains", "does not contain", "starts with", "ends with" // - numberObject: "=", ">", "<", ">=", "<=" + // - booleanObject: "=", "<>" // - boolean: "=", "<>" // - null: "is null", "is not null" "value": any, // Required (except for null type). Value to compare against. Type depends on filter type - "key": string // Required only for stringObject, numberObject, and categoryOptions types when filtering on nested fields like metadata + "key": string // Required only for stringObject, numberObject, booleanObject, and categoryOptions types when filtering on nested fields like metadata or score names } ] ``` @@ -365,6 +366,7 @@ def list( ### Scores (requires join with scores table) - `scores_avg` (number) - Average of numeric scores (alias: `scores`) - `score_categories` (categoryOptions) - Categorical score values + - `score_booleans` (booleanObject) - Boolean score values. Use `key` for the score name and a boolean `value`, e.g. `{"type": "booleanObject", "column": "score_booleans", "key": "is_correct", "operator": "=", "value": true}`. The `<>` operator also matches traces without a score of that name. ## Filter Examples ```json @@ -910,7 +912,7 @@ async def list( ```json [ { - "type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "boolean", "null" + "type": string, // Required. One of: "datetime", "string", "number", "stringOptions", "categoryOptions", "arrayOptions", "stringObject", "numberObject", "booleanObject", "boolean", "null" "column": string, // Required. Column to filter on (see available columns below) "operator": string, // Required. Operator based on type: // - datetime: ">", "<", ">=", "<=" @@ -921,10 +923,11 @@ async def list( // - number: "=", ">", "<", ">=", "<=" // - stringObject: "=", "contains", "does not contain", "starts with", "ends with" // - numberObject: "=", ">", "<", ">=", "<=" + // - booleanObject: "=", "<>" // - boolean: "=", "<>" // - null: "is null", "is not null" "value": any, // Required (except for null type). Value to compare against. Type depends on filter type - "key": string // Required only for stringObject, numberObject, and categoryOptions types when filtering on nested fields like metadata + "key": string // Required only for stringObject, numberObject, booleanObject, and categoryOptions types when filtering on nested fields like metadata or score names } ] ``` @@ -967,6 +970,7 @@ async def list( ### Scores (requires join with scores table) - `scores_avg` (number) - Average of numeric scores (alias: `scores`) - `score_categories` (categoryOptions) - Categorical score values + - `score_booleans` (booleanObject) - Boolean score values. Use `key` for the score name and a boolean `value`, e.g. `{"type": "booleanObject", "column": "score_booleans", "key": "is_correct", "operator": "=", "value": true}`. The `<>` operator also matches traces without a score of that name. ## Filter Examples ```json