lmnr-ai / lmnr

Laminar - open-source all-in-one platform for engineering AI products. Crate data flywheel for you AI app. Traces, Evals, Datasets, Labels. YC S24.
https://www.lmnr.ai
Apache License 2.0
1.2k stars 60 forks source link

minor fix to correctly export spans to datasets #113

Closed dinmukhamedm closed 1 month ago

dinmukhamedm commented 1 month ago

Spans were exported to datasets into the data field despite having data, target, and metadata keys. This was because target was only visually converted to a JSON object, but remained a string in the state. This commit addresses that


[!IMPORTANT] Fixes JSON export issue in ExportSpansDialog by ensuring data and target are correctly initialized as JSON objects.

  • Behavior:
    • Fixes issue where data and target were not correctly exported as JSON objects in ExportSpansDialog.
    • Initializes data and target using toJsonObject() to ensure proper JSON conversion.
  • Code Simplification:
    • Simplifies JSON stringification in Formatter by using data, target, and metadata state variables directly.

This description was created by Ellipsis for c27ecd913b6b4b9edcb6b0b8dd9e5303279e44b3. It will automatically update as commits are pushed.