* chore(dataset-run-items): GET /dataset-run-items
* fixup(dataset-run-items): GET /dataset-run-items
* chore(dataset-run-items): GET datasetRun/[runName]
* fix(dataset-run-items): return 0 for count when no records found
* fix(dataset-run-items): ensure offset is calculated only when page and limit are present
* feat(dataset-run-items): enhance dataset filtering by adding datasetId support and refactor related functions
* chore: rm comment
* refactor(dataset-run-items): rename dataset run name to ID across API and table definitions
* feat(dataset-run-items): add dataset_run_items to Clickhouse table names and refactor dataset filtering to use camelCase
* fix(dataset-run-items): update dataset filtering to ensure only the latest version of each dataset run item is retrieved
* chore: imports
* chore: fix de-duplication
* feat(dataset-run-items): implement experiment service writes
* chore: add
* fix(experiments): update error messages for missing API key using constants
* chore(experimentCreateQueue): increase backoff delay to 10 seconds
* chore(auth): update ingestion types for improved flexibility
* chore: create traces & error-level generations for DRIs
* chore: unify timestamps
* chore: revert test to PG implementation until we add DRI migration across environments
* chore: typo
* chore: implement unified trace ID generation for ClickHouse and PostgreSQL executions to prevent duplicate traces
* chore: refactor trace creation logic for ClickHouse and PostgreSQL executions to use a unified approach
* chore: eslint
* chore: comment
* chore: rebase
* chore: rebase
* chore: rename function for clarity and fix typo in comments
* refactor: remove fetchDatasetRun function and replace with direct Prisma query for dataset run retrieval
* chore: eslint
* chore: fix test
* chore: fix test
* refactor: rename function and update comments for clarity in experimentServiceClickhouse
* feat(dataset): implement dataset run items deletion queue and processing
* feat(dataset): add dataset run items deletion functionality and integrate with deletion queue
* chore: revert imports
* chore: handle DRI deletion on project deletion conditionally
* fix(dataset-router): await Promise.all for dataset run items deletion
* refactor(dataset-router): streamline dataset deletion process and ensure async handling of dataset run items
* fix(env): add new environment variable for dataset run items deletion concurrency duration
* chore: rm comment
* refactor(dataset-run-items): update delete functions to use object destructuring for parameters
* fix(dataset-run-items): replace hardcoded request timeout with environment variable for deletion timeout
* refactor(dataset): rename and restructure dataset deletion functionality, replacing dataset run items deletion with a unified dataset deletion queue
* fixup(experiments): support trigger for remote experiment run
* chore: remove instructions
* chore: rename webhook > remote experiment server side
* chore: rename webhook > remote experiment client side
* style: design review
* chore: lint
* fix(experiments): change URL validation to use z.url() in RemoteExperimentUpsertForm
* chore: rename
* feat(datasets): add transformation function for datasets and update API responses
* docs: add technical specs for multi window/prompt playground
* docs: add requirements and tech summary for sharing
* feat: add multi-window playground architecture and state isolation
* feat: make playground UI multi-window capable
* fix: multi window playground caching
* fix: jump to playground button adds windows to playground using stable id
* fix: avoid race condition in writing to cache before navigating to playground
* feat: add collapsible, more compact sections to non-model config
* feat: add compact version of model picker/params component
* feat: add ability to copy window states to multi playground
* fix: solve header crowding for thin windows in playground
* feat: make entire playground config section collapsible
* feat: change SaveToPrompt button to align with other window buttons
* feat: switch buttons in page header to icon-only when too small
* fix: adjust button labels to fit button size
* fix: update the execution window status correctly
* docs: complete remaining task items
* refactor: simplify playground state management hooks
* fix: make the model configuration section prettier
* docs: remove agent work files
* refactor: call register functions on the registry directly
* chore: refactored some components and compacted the design even more
* chore: move add message buttons
* chore: start align model param settings popover when compact
* chore: small UI spacing improvements
* fix: scrolling bug
* fix: handle config headers when window gets small
* chore: rename button hover
* feat: move CMD+Enter to execute all button
* feat: give user the choice to jump to fresh/existing playground
* push
* chore: fix
* chore: fix
* push
* push
* fixes
---------
Co-authored-by: Max Deichmann <m.deichmann@tum.de>
* fix: use drop down for prompt full text search
* fix: use drop down for prompt full text search
* fix: use drop down for prompt full text search
* fix: use drop down for prompt full text search
* fix: use drop down for prompt full text search
* feat(migrations): add dataset_run_items table in clickhouse
* feat(dataset): add environment variables and utility for pg/ch execution
* chore: re-write `runitemsByRunIdOrItemId` to support both clickhouse and postgres execution
* chore: use `runItemsByRunId` or `runItemsByItemId` rather than `runitemsByRunIdOrItemId`
* chore: rename env variables
* chore: reflect dri as ch data is seeder
* fixup: dataset run item types and converters
* chore: background migration
* chore: rewrite dataset-router routes
* chore(dataset): dual-write strategy for dataset run items to support ClickHouse and PostgreSQL
* chore: add utilities and converters
* chore: rewrite GET api/public/dataset-run-items
* feat(dataset): implement dataset run items deletion queue and processing
* chore: rewrite DELETE api/public/datasets/{datasetName}/runs/{runName}
* chore: rewrite GET api/public/datasets/{datasetName}/runs/{runName}
* fixup: rewrite GET api/public/datasets/{datasetName}/runs/{runName}
* chore(schema): add error to DRI schema
* fixup(ingestion): support dataset run items
* fixup: rewrite POST /api/public/dataset-run-items
* fixup: rewrite POST /api/public/dataset-run-items --amend
* fixup(ingestion): support dataset run items --amend
* fixup(experiments): preliminary implementation, for illustrative purposes only
* fixup(schema): indexes
* fixup(schema): remove indexes, add `output`
* chore: support DRI ingestion
* chore: eslint, writes related
* chore: rewrite experiment service
* chore: rm file
* chore: cascade delete dataset run items
* chore: add clustered migrations
* chore: update background migration
* chore: handle experiment job errors
* chore: remove CH read implementation
* chore: remove md file
* chore: remove CH read implementation II
* chore: fix typing
* chore: fix migration types
* fix: lint/imports
* fix: import errors
* chore: imports and comments
* chore: remove only from test
* fix: validateDatasetRunAndFetch
* fix: validateDatasetRunAndFetch id
* fixup: attempt fix of test
* fix: test
* chore: test validate logging
* chore: adjust logs
* chore: revert cascade delete
* Revert "feat(dataset): implement dataset run items deletion queue and processing"
This reverts commit 9f725f053386ded41e3617efaacee128d5ac023f.
* chore: delete imports
* revert: experiment service changes
* chore: adjust comment
* rename: env variables to incl experiment
* chore: remove unused variable eslint disables from datasetExecution and types files
* refactor: remove enrichedDatasetRunItem function and integrate its logic directly into IngestionService
* chore: remove TODO comment regarding dataset run item authorization
* refactor: replace Date constructor with parseClickhouseUTCDateTimeFormat for date parsing in dataset run item conversion
* chore: remove deprecated flag for runitemsByRunIdOrItemId method
* refactor: remove getDatasetRunItemsByRunId function to streamline dataset run item retrieval
* refactor: add back run properties in dataset runs mapping
* chore: revert changes to delete-dataset-run API
* refactor: remove validateDatasetItemAndFetch function and replace its usage with direct Prisma query in IngestionService
* refactor: delete validateCreateDatasetRunItemBodyAndFetch function and replace its logic with direct Prisma queries in dataset-run-items API
* refactor: move createOrFetchDatasetRun function to a new dataset-runs API file and maintain unique constraint handling
* refactor: remove validateDatasetRunAndFetch function and replace its usage with direct Prisma queries in dataset-run-items and IngestionService
* chore: nits
* refactor: streamline dataset run item creation by consolidating validation and execution logic
* chore: fix imports
* fix: types
* fix: simplify ingestion schema
* refactor: enhance ingestion schema creation to support public and internal environments
* chore: extend immutable keys list DRI
* chore: use same id for clickhouse and postgres
* chore: remove background migration trigger
* chore: move dataset run items migration into readme
* chore: remove creation of DRI in seeder
* chore: lint
* feat(tracing): pretty display json as collapsible table
* show empty list and unwrap single item containing objects
* enable toggle for code or pretty view
* clean up
* fix type casting
* some more fixes
* expand row with click anywhere
* fix alignment
* remove dead code
* cleanup
* make it more clean
* don't unwrap initial items
* collapse expand all
* fixing collapse button
* don't render for chatml
* better markdown check
* reduce col width
* make table borderless
* display null / empty string for empty value
* smaller text
* make table more compact
* make preview items grey & italic
* linebreak path column
* table headers inherit color
* cleanup
* external collapsed state; also move button into code view
* remove code view switch
* show empty dicts also as empty
* always show objects as tables
* extract markdown into helper function
* review fixes
* update
* Update turbo.json to use @langfuse/shared#dev instead of #build
Co-authored-by: max <max@langfuse.com>
* Add incremental build script and update turbo.json dev dependencies
Co-authored-by: max <max@langfuse.com>
* Remove build:dev script and update turbo.json dependencies
Co-authored-by: max <max@langfuse.com>
* push
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* perf: enable API Key and Prompt caching in redis by default
* chore: update sync prompt test
* chore: disable prompt caching for sync web tests
* chore: enable prompt caching in sync tests
* chore: disable cachking for v1 pipeline
* chore Use cacheEnabled as pure test overwrite
* chore; undefined check
* chore: log body
* chore: patch promptCache test
* chore: fmt
* remove console log
* chore(experiments): enhance error handling in LLM call and implement retry logic for experiment creation jobs
- Added try-catch block in callLLM function to handle specific API errors and return appropriate ApiError responses.
- Implemented retry logic for experiment creation jobs in experimentQueue, allowing retries for rate-limited and server errors, with a delay mechanism based on job age.
* chore: push
* refactor: introduce delay utility for job processing
* chore: abstract standardized error handling for LLM operations
* refactor: reorganize utilities and enhance error handling for job processing
* chore: push
* chore: typing
* chore: unify error message
* fix(retry-handler): change executeTakeFirst to executeTakeFirstOrThrow for better error handling
* chore(prompt-experiments): set langfuse-native environment
* refactor: no longer export ingestionEvent schema directly
* chore: rm line number
* chore(ingestion): refactor processEventBatch to accept options object
* chore(ingestion): refactor ingestion schemas for public and internal environments
- Introduced separate schemas for public and internal environments.
- Updated environment name validation logic and error messages.
- Refactored event schemas to utilize the new schema structure.
- Deprecated direct export of `ingestionEvent` schema in favor of factory method for better environment handling.
* chore: push
* chore: type environment schema as string
* chore: push
* chore: fix import statements
* chore: update langfuse-langchain to version 3.38.3
* chore: prettier
* chore: revert prettier
* add prettier command
* add pre-commit hook
* sync prettier config with .vscode config
* add line
* fix husky
* update for less changes
* upgrade to prettier 3.4 for bug fixes
* ignore no-undef in TS (also worker!)
* changes to prettier
* adhere to style
* make prettier 3.4 default for bug fix
* add prettier ignore
* reset to standard
* update to 3.6.2
---------
Co-authored-by: Max Deichmann <m.deichmann@tum.de>
* chore(dx): unit tests run against their own db
* fix clickhouse
* clean up a bit
* close
* update only use different postgres
* update with command
* remove CH
* fix: create virtual timestamp column in AMT query to support all filters
* chore: add test logging
* chore: skip database prune for async tests
* chore: cleanup
* chore: drop console logs
* perf: start to experimentally shift reads to new aggregatingmergetrees
* chore: linting
* chore: more linting
* chore: create checklist for trace table view migrations
* feat: shift by id queries onto new AMTs
* chore: cover traces for public api
* chore: add notes for maxMap
* chore: incorporate feedback into query declarations
* chore: cleanup queries
* chore: adjust reads to new layout
* chore: update ingestion pipeline to make use of nullable fields
* chore: add sampling
* chore: update sampling decision attribute
* chore: fix limit for getTracesByIds
* chore: spacing
* chore: linting
* Disable import button during processing and show loading state
Co-authored-by: marc <marc@langfuse.com>
* prettier
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* run experiments with placeholders as well
* add missing file
* fix experiements
* run outside of loop
* add tests
* fix tests
* make tests clean again
* also test that variables resovle first
* Enhance prompt search to include tags with case-insensitive matching
Co-authored-by: marc <marc@langfuse.com>
* drop md
* prettier
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* fix(prisma): update JobExecution and DefaultLlmModel relations to include onUpdate and onDelete behaviors to match DB constraints
* chore(prisma): update foreign key onUpdate behavior for job_template_id in JobExecution model
* Revert "chore(prisma): update foreign key onUpdate behavior for job_template_id in JobExecution model"
This reverts commit e65c12c9c36a1f8732560e665b1d8d7422c530f0.
* Fix typos: GitHub brand name and "check out" verb phrase
Co-authored-by: marc <marc@langfuse.com>
* Checkpoint before follow-up message
* Fix GitHub brand name and typos across documentation and UI
Co-authored-by: marc <marc@langfuse.com>
* Changes from background composer bc-bdbd909e-6932-4489-b125-e66b1d0f5ebe
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* no naming collisions between prompt and placeholder
* tests for variable placeholder name collision
* fix test spelling
* also show conflict in playhground
* Add environment to PostHog event tracking for traces and observations
Co-authored-by: marc <marc@langfuse.com>
* use object envs instead of trace env
* fix
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* upgrade turbo
* add web dev turbo runner
* upgrade docker
* fix linter
* set env mode to loose (as in turbo v1) so we don't have to double specify env vars
* feat(nav): integrate HoverCard component for improved navigation item display
* refactor(nav): enhance HoverCard integration and sidebar styles for improved UX
* chore(sidebar): replace cookie-based state management with local storage for sidebar state persistence
* chore: push
* refactor(nav): wrap HoverCardContent in Portal for improved rendering context
* style: mark hovered item as active
* chore(CreateLLMApiKeyForm): replace Input with PasswordInput for improved UX
* chore: revert
* chore(data): add seed data and constants for datasets, prompts, and traces
- Introduced new JSON files for chat ML and nested JSON data.
- Created seed constants for datasets and prompts to streamline data generation.
- Updated seed scripts to utilize new constants and improve dataset creation logic.
- Enhanced Clickhouse preparation scripts to support new dataset structures and trace generation.
- Added utility functions for generating unique trace IDs.
This commit lays the groundwork for improved data handling and observability in the Langfuse application.
* chore(data): remove deprecated prompt files and enhance seed constants
* chore(prisma): remove unique constraint on projectId, datasetId, and input in DatasetItem model
* chore: push
* chore(seeder): introduce seeder abstraction
* chore: typos
* chore: restructure files
* chore: restructure files
* chore: fix imports
* chore: fix imports
* chore: lint
* chore: simplify
* chore: ensure eval data integrity
* chore: update metric name calculation in ClickHouse query builder
* refactor: use test-utils for clickhouse inserts
* chore: add otel conventional attributes to clickhouse db spans
* chore: use db.system instead of db.system.name
* chore: set span kind client for clickhouse queries
* fix(NewDatasetItemForm): add JSON formatting utility for input, output, and metadata fields
* perf(NewDatasetItemFromExistingObject): conditionally render NewDatasetItemForm based on form state
* fix(NewDatasetItemForm): update JSON value check to handle undefined case
* fix(TracesTable): stabilize control column definition
- Ensured conditional rendering of the bookmarked column remains intact while simplifying the structure.
* refactor(TracesTable): enhance column visibility and order identifiers for control states
- Updated dialog header to use a title component and improved button layout for clarity.
- Adjusted positioning of the close button for better alignment.
- Enhanced header and footer with rounded corners for a more polished look.
* fixup: limit render duration of traces table
* fixup: reduce render cycles through data flows and memoization
* refactor: enhance performance and structure of table components
- Removed unnecessary console logs in `data-table.tsx`.
- Refactored `TablePeekView` to use a more structured props type and memoization for improved performance.
- Updated `usePeekData` to reduce stale time from 5 minutes to 1 minute.
- Replaced `IOTableCell` with `MemoizedIOTableCell` in various components to optimize rendering.
- Adjusted `peekView` configurations in `observations.tsx` and `traces.tsx` for consistency and clarity.
* chore: eslint
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* chore: move features
* changes to pro plan
* chore: move features
* truncate title and description to prevent wraps
* remove unnecessary padding from charts
* improve bignumber chart
* add min h/w
* mobile resizing
* fix
2025-05-29 15:58:38 +00:00
Max DeichmannGitHubellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* perf: add exact timestamp match for eval batch actions
* perf: add exact timestamp match for eval batch actions
* perf: add exact timestamp match for eval batch actions
* chore: make `project_id` nullable on `eval_templates`
* feat: add script for managed langfuse evaluators
* feat: restyle running evaluator configs table
* feat: add peek view for running evals
* fixup: add peek view for evaluator library
* fixup: add configure button to table
* feat: rework eval creation flow
* feat: add option to edit eval from table
* fixup: configure evaluator flow with traces data preview
* style: eval configuration UI elements
* chore: add support for current langfuse templates
* chore: reference templateId on jobExecution
* style: add maintainer icon across
* chore: extract WorkerEvaluationVariableService
* fixup: support live data mapping interface
* fixup: revamp datasets eval ui
* fixup: add clone functionality
* chore: rename online evaluation -> llm-as-a-judge
* feat: add evaluator selection in experiment creation flow
* chore: refactor into hooks in experiment form
* feat: add ragas evaluator prompt templates
* chore: show evaluator prompt preview by default
* fix: eval table filtering
* feat: add input box to slider
* fix: clean up running eval peek view and logs
* fix: ensure preview variables are not wrapped in quotes in evaluation prompt preview
* feat: support navigating through traces table
* feat: support default model workflow
* fix: typos in managed evaluators
* fix: do not allow selection of evaluators requiring default to run
* fix: type and build errors
* chore: rename table to default_llm_model
* chore: rm empty file
* fixup: complete rename
* chore: push
* style: eval set up form
* style: separate new evaluator form out into two steps
* chore: ensure we only run evals if default model is set
* chore: add `partner` col to `eval_templates`
* style: new eval template creation
* chore: add proper mapping for dataset evals
* feat: also put evaluation selection on datasets page
* feat: datasets also run on historic experiments after creating mapping
* revert: 09ab242dc12c8647bc716c84d180bc8e631d4919
* chore: fix eslint and ts
* chore: fix warnings
* fix: ensure we inactivate all job configs that rely on default eval model
* fix: tests
* chore: fix eslint
* chore: wrap in tx
* chore: fix default model checkbox logic
* chore: improve wording on delete model
* fix: eslint
* chore: adjust migration order
* style: push ui improvements
* style: sort templates by partner
* fix: eslint
* chore(dashboards): expand measures for dashboards
* chore: add testcase
* chore: define inputTokens and outputTokens
* chore: add timePerOutputToken and costs
* chore: fix definition and handling of tag based breakdowns
* feat(dashboard): make dashboard widgets draggable
* chore: do not update on layout change
* chore: fix size
* chore: remove the preventCollision flag
* chore: linting
* chore: get row height dynamically
* chore: make chart resizable
* chore: styling for resizes
* chore: add migration to align y values
* chore: add owner to project and return langfuse dashboards
* chore: show owner for dashborads in table
* chore: snapshot
* chore: snapshot
* chore: allow widget clone
* chore: snapshot
* chore: linting
* chore: use project instead of user
* chore: show error message on clone failure
* chore: indicate existing dashboard widget relationship
* chore: show only project dashboards in selection for adding widgets
* chore: make full dashboard row clickable
* chore: add clone button to langfuse dashboards
* feat(dashboards): add support for cloning existing dashboards
* chore: move buttons into a dedicated dropdown menu
* chore: allow updates to dashboard name and description
* chore: lint
* chore: removal double capturing of dashboard delete
* chore: track deletions
* feat: full text search
* push
* feat: full text search
* feat: full text search
* feat: full text search
* feat: full text search
* feat: full text search
* fix
* push
* fix: fix json limits and scope to single bodies only
* fix
* fix
* jumping UI
* jumping UI
* jumping UI
* push
* Update web/src/components/table/data-table-toolbar.tsx
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* push
* fix: fix json limits and scope to single bodies only
* push
* fix: fix json limits and scope to single bodies only
* fix: fix json limits and scope to single bodies only
* fix: fix json limits and scope to single bodies only
* fix: fix json limits and scope to single bodies only
* fix: fix json limits and scope to single bodies only
* chore: memoize table body for enhanced front end performance
* chore: push
* chore: refactor
* style: speed up animation
* chore: re-render on table state changes
* chore: import function directly
* chore: refactor to use timestamp
* chore: push
* chore: push
* feat: add dlx retry queue and service
* feat: add dlx retry queue and service
* feat: add dlx retry queue and service
* feat: add dlx retry queue and service
* feat: add dlx retry queue and service
* feat: add new organizations apiKey route
* chore: implement additional org routes
* chore: add API docs
* chore: checkin openapi spec
* chore: update tests
* feat: allow org api key management via admin api
* feat: allow the creation of projects using an org api key
* chore: allow deletion of projects via API
* feat: create outline of SCIM Users support
* feat: implement SCIM style user endpoints
* chore: allow set password on user
* chore: lint
* feat: add endpoints to manage project and organization memberships
* chore: add memberships api docs
* chore: reject project membership calls if entitlement is missing
* chore: add team plan to test org
* chore: add reference to full Langfuse API spec
* feat: add new organizations apiKey route
* chore: implement additional org routes
* chore: add API docs
* chore: checkin openapi spec
* chore: update tests
* feat: allow org api key management via admin api
* feat: allow the creation of projects using an org api key
* chore: allow deletion of projects via API
* feat: create outline of SCIM Users support
* feat: implement SCIM style user endpoints
* chore: allow set password on user
* chore: lint
* feat: add endpoints to manage project and organization memberships
* chore: add memberships api docs
* chore: reject project membership calls if entitlement is missing
* chore: add team plan to test org
* feat: add new organizations apiKey route
* chore: implement additional org routes
* chore: add API docs
* chore: checkin openapi spec
* chore: update tests
* feat: allow org api key management via admin api
* feat: allow the creation of projects using an org api key
* chore: allow deletion of projects via API
* feat: create outline of SCIM Users support
* feat: implement SCIM style user endpoints
* chore: allow set password on user
* chore: lint
* chore: add scim api docs
* chore: remove outdated generated artifacts
* feat: add new organizations apiKey route
* chore: implement additional org routes
* chore: add API docs
* chore: checkin openapi spec
* chore: update tests
* feat: allow org api key management via admin api
* feat: allow the creation of projects using an org api key
* chore: allow deletion of projects via API
* chore: add documentation for new project routes
* chore: cleanup
* chore: error updates and handling
* chore: reduce reduntant error handling
* chore(evals): fall back to bullmq `job.data.timestamp` allowing for successful retries
* chore: test
* chore: test
* docs: add diagram and docs
* chore: typo
* chore: typo
* chore: refactor authentication for admin apis
* chore: lint
* chore: address feedback
* feat: add post organizations endpoint
* chore: update tests
* chore: update api key data model
* chore: align code with new scoped api keys
* chore: typing
* chore: align tests with new logic
* chore: remove ratelimitoverrides
* chore: remove accesslevel from queue message
* chore: add additional check to ingestion endpoint
* chore: add test for legacy api key format in redis
* chore: map all api keys in auditlog
* added environment filter option to traces
* WIP on multi-select ui inconsistency
* fixed overflow issue in multi select where an item would not take the full width automatically; also changed to overflow-x-auto
* fixed invalid DOM nesting of div within p (FormDescription) that resulted in a hydration error
* fix multiselect to cut overflowing text with ellipsis and take full name as titlte so you can hover over it, removed unnecessary css classes
* WIP on create evaluator page ui issue with filter builder
* Revert "WIP on create evaluator page ui issue with filter builder"
This reverts commit fd6dd507f2df3c5fb404f4e38a2983e8ef6405ef.
* hide empty string from multi-select options, as supporting empty values would require further work - out of scope for now; also checked for side effects, with current usage all good
* Added test suite for eval filtering
* Resolved comment: removed getEnvironmentsForProject from traces router and instead fetched environments inside evaluator-form via api.projects.environmentFilterOptions
* move eval filtering tests into separate test file
* removed redundancy via fixtures, prepared tests for concurrency
* filtering tests run concurrently
* extracted traceFilterOptions fetching into separate hook as it is used in both the evaluator form and the traces table, also fixed traces table since the environment was now missing there
* useTraceFilterOptions Hook after merge
* Make TraceOptions keys partial so that we can update filter options asynchronously
* default to empty object if response undefined
* exclude environment filter builder column from traces table since toolbar already has env
* removed useTraceFilterOptions hook as use case changed such that extraction into hook is no longer warranted
* chore: pin dev clickhouse version to 24.3
* chore: only add input format flag for cloud
* chore: whitelist accepted cloud regions
* chore: disable test
* fix: (workaround) evals page overflows when rendering right hand side metadata bar
This is more of a workaround, we should probably disable the overflow on the main wrapper div in layout.tsx and enable it only where needed - or find out why the overflow inside the metadata sidebar trigggers the scrollbar to pop up - some info on what I found:
- The body and other divs close to the root do not increase their size.
- The navigation sidebar does increase its vertical height, but limiting that does not resolve the main scrollbar.
- Limiting specifically the wrapper div in layout.tsx with overflow-hidden does resolve this, but globally disabling it requires most pages to be refactored.
* Revert "fix: (workaround) evals page overflows when rendering right hand side metadata bar"
This reverts commit 313a1c0d8a885a04974399f850f7f9aee58fd714.
* fix(ui): TableWithMetadataWrapper uses contain-layout on its root div so that EvaluatorDetail overflow issue is mitigated
Checked for side effects on the other components using TableWithMetadataWrapper and all work as expected.
---------
Co-authored-by: Marlies Mayerhofer <74332854+marliessophie@users.noreply.github.com>
* chore(annotation-scores): revert to synchronous delete; upsert on create route
* fix: ensure scores data not only marked as stale but refreshed on score update
* feat: add support for GCS buckets
* chore: cleanup
* chore: trim gcs credentials before parsing
* chore: add logging for redis shutdown in tests
* chore: update timeout for trace delete test
* chore: bump trace delete concurrency for tests
* feat(evals): enable deletion of evaluators and templates via UI
* Added tests for the evals job and template deletion trpc endpoints
* evals-trpc test refactor, it had a side effect on other tests since it was pruning the db, now instead creates a new org and project per tests and cleans them up after all tests are done
* removed test comments as those are now implemented
* fix wrong wording
* added template version to delete confirmation on template details delete action
* DeleteButton refactoring and moved deletion of templates to LFE-4573
* moving the call to captureDeleteSuccess inside the successful branch of executeDeleteMutation
* Display lock icon when action button in icon mode is unauthorized
* fix: quietly delete scheduled evals for deleted job executions
---------
Co-authored-by: Max Deichmann <m.deichmann@tum.de>
* fix(trace-timeline): overflow and scroll behaviour
* fix(trace-timeline): show maximum of 3 scores and remainder in hover card
* push
* chore: refactor
* chore
* chore
- We build two containers, web (./web) and worker (./worker)
- We have shared code between these two in the shared package (./packages/shared). For that package, we have different entry points [package.json](mdc:packages/shared/package.json).
## Domain layer
The most important domain objects are in [observations.ts](mdc:packages/shared/src/domain/observations.ts), [traces.ts](mdc:packages/shared/src/domain/traces.ts), [scores.ts](mdc:packages/shared/src/domain/scores.ts).
## Database schema
We use Postgres and Clickhouse.
- The postgres schema is in [schema.prisma](mdc:packages/shared/prisma/schema.prisma)
- The clickhouse schema is in [0001_traces.up.sql](mdc:packages/shared/clickhouse/migrations/clustered/0001_traces.up.sql), [0002_observations.up.sql](mdc:packages/shared/clickhouse/migrations/clustered/0002_observations.up.sql), [0003_scores.up.sql](mdc:packages/shared/clickhouse/migrations/clustered/0003_scores.up.sql)
- When writing tests, focus on decoupling each `it` or `test` block to ensure that they can run independently and concurrently. Tests must never depend on the action or outcome of previous or subsequent tests.
- When writing tests, especially in the __tests__/async directory, ensure that you avoid `pruneDatabase` calls.
# Snyk cannot upload results in merge group. Hence, we only run on PRs and when pushingon the main branch https://github.com/github/codeql-action/issues/1572
Langfuse is an **open source LLM engineering** platform for developing, monitoring, evaluating and debugging AI applications. See the README for more details.
## Linting
- Run `pnpm run lint` to lint all packages.
- Fix issues automatically with `pnpm run lint:fix`.
## Tests
- Codex cannot run the test suite because it depends on Docker-based infrastructure that is unavailable in this environment.
- When writing tests, focus on decoupling each `it` or `test` block to ensure that they can run independently and concurrently. Tests must never depend on the action or outcome of previous or subsequent tests.
- When writing tests, especially in the __tests__/async directory, ensure that you avoid `pruneDatabase` calls.
## Cursor Rules
- Additional folder-specific rules live in `.cursor/rules/`.
## Commits
- Follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) when crafting commit messages.
Langfuse is an open-source LLM engineering platform that helps teams collaboratively develop, monitor, evaluate, and debug AI applications.
The main feature areas are tracing, evals and prompt management. Langfuse consists of the web application (this repo), documentation, python SDK and javascript/typescript SDK.
This repo contains the web application, worker, and supporting packages but notably not the JS nor Python client SDKs.
## Repository Structure
High level structure. There are more folders (eg for hooks etc).
pnpm run dev:web # Web app only (localhost:3000) - **used in most cases!**
pnpm run dev:worker # Worker only
pnpm run dx # Full initial setup: install deps, reset DBs, resets node modules, seed data, start dev. USE SPARINGLY AS IT WIPES THE DATABASE & node_modules
```
### Database Management
database commands are to be run in the `packages/shared/` folder.
- Use `golang-migrate` CLI for database migrations
- All database operations go through Prisma ORM for PostgreSQL
- Foreign key relationships may not be enforced in schema to allow unordered ingestion
### Testing
- Jest for API tests, Playwright for E2E tests
- For backend/API changes, tests must pass before pushes
- Add tests for new API endpoints and features
- When writing tests, focus on decoupling each `it` or `test` block to ensure that they can run independently and concurrently. Tests must never depend on the action or outcome of previous or subsequent tests.
- When writing tests, especially in the __tests__/async directory, ensure that you avoid `pruneDatabase` calls.
### Code Conventions
- **Pages Router** (not App Router)
- Follow conventional commits on main branch
- Use CSS variables for theming (supports auto dark/light mode)
- TypeScript throughout
- Zod v4 for all input validation
## Environment Setup
- **Node.js**: Version 20 (specified in `.nvmrc`)
- **Package Manager**: pnpm v9.5.0
- **Database Dependencies**: Docker for local PostgreSQL, ClickHouse, Redis, MinIO
- **Environment**: Copy `.env.dev.example` to `.env`
@@ -27,7 +27,7 @@ The maintainers are available on [Discord](https://langfuse.com/discord) in case
## Making a change
_Before making any significant changes, please [open an issue](https://github.com/langfuse/langfuse/issues)._ Discussing your proposed changes ahead of time will make the contribution process smooth for everyone. Large changes that were not discussed in an issue may be rejected.
_Before making any significant changes, please [open an issue](https://github.com/langfuse/langfuse/issues)._ Discussing your proposed changes ahead of time will make the contribution process smooth for everyone. Changes that were not discussed in an issue may be rejected.
Once we've discussed your changes and you've got your code ready, make sure that tests are passing and open your pull request.
@@ -42,7 +42,7 @@ A good first step is to search for open [issues](https://github.com/langfuse/lan
- NextAuth.js / Auth.js
- tRPC: Frontend APIs
- Prisma ORM
- Zod
- Zod v4
- Tailwind CSS
- shadcn/ui tailwind components (using Radix and tanstack)
- Fern: generate OpenAPI spec and Pydantic models
@@ -58,16 +58,30 @@ See this [diagram](https://langfuse.com/self-hosting#architecture) for an overvi
@@ -83,7 +97,7 @@ Full database schema: [packages/shared/prisma/schema.prisma](packages/shared/pri
We built a monorepo using [pnpm](https://pnpm.io/motivation) and [turbo](https://turbo.build/repo/docs) to manage the dependencies and build process. The monorepo contains the following packages:
-`web`: is the main application package providing Frontend and Backend APIs for Langfuse.
-`worker` (no production yet): contains an application for asynchronous processing of tasks. This package is not yet used in production.
-`worker`: contains an application for asynchronous processing of tasks.
-`packages`:
-`shared`: contains shared code between the above packages.
-`config-eslint`: contains eslint configurations which are shared between the above packages.
@@ -110,16 +124,24 @@ Requirements
cd langfuse
```
3. Create an env file
3. Install dependencies and set up pre-commit hooks
```bash
pnpm install
pnpm run prepare # Sets up Husky pre-commit hooks for code formatting
```
4. Create an env file
```bash
cp .env.dev.example .env
```
4. Run the entire infrastructure in dev mode
4. Run the entire infrastructure in dev mode. **Note**: if you have an existing database, this command wipes it. Also, this will fail on the very first run. Please run it again.
```bash
pnpm run dx
pnpm run dx # first run only (resets db, docker containers, etc...)
pnpm run dev # any subsequent runs
```
You will be asked whether you want to reset Postgres and ClickHouse. Confirm both with 'Y' and press enter.
@@ -134,6 +156,12 @@ Requirements
- Username: `demo@langfuse.com`
- Password: `password`
To get comprehensive example data, you can use the `seed` command:
```sh
pnpm run db:seed:examples
```
## Monorepo quickstart
- Available packages and their dependencies
@@ -183,23 +211,65 @@ Requirements
On the main branch, we adhere to the best practices of [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). All pull requests and branches are squash-merged to maintain a clean and readable history. This approach ensures the addition of a conventional commit message when merging contributions.
## Test the public API
## Running Unit Tests
The API is tested using Jest. With the development server running, you can run the tests with:
All tests run in the CI and must pass before merging.
All tests run against a running langfuse instance and **write/delete real data from the database**.
Run all
### Test Database Setup
Per default, the tests use the local development database. Therefore, wiping your data in the process.
For proper test isolation, create a `.env.test` file in the root directory:
```bash
npm run test
cp .env.test.example .env.test
```
Run interactively in watch mode
Then, a different PostgreSQL and Redis are used for the tests.
The `.env.test` file only overrides the set values and falls back on `.env` for all undefined values.
```bash
npm run test:watch
- **PostgreSQL**: Uses separate `langfuse_test` database for isolation
- **ClickHouse**: Uses shared `default` database for now
- **Redis**: Uses database 1 instead of 0 for isolation (Redis data is not cleaned between tests)
Tests automatically create the PostgreSQL test database if it doesn't exist and clean up data between runs.
### Tests in the `web` package (public API)
We're using Jest with in the `web` package. Therefore, if you want to provide an argument to the test runner, do it directly without an intermittent `--`.
There are three types of unit tests:
- `test-sync`
- `test-async`
- `test-client`
To run a specific test, for example the test: `"should handle special characters in prompt names"` in `prompts.v2.servertest.ts`, run:
```sh
cd web # or with --filter=web
pnpm test-sync --testPathPattern="prompts\.v2\.servertest" --testNamePattern="should handle special characters in prompt names"
```
These tests are also run in CI.
To run all tests:
```sh
pnpm run test
```
Run interactively in watch mode (not recommended!)
```sh
pnpm run test:watch
```
### Tests in the `worker` package
For the `worker` package, we're using `vitest` to run unit tests.
```sh
pnpm run test --filter=worker -- FILE_YOU_WANT_TO_TEST.ts -t "test name"
```
## CI/CD
@@ -327,6 +397,20 @@ Please note that
Until the V3 release, both the JSON record must be updated **and** a migration must be created to continue supporting self-hosted users. Note that the migration must updated both the `models` as well as the `prices` table accordingly.
## Updating the OpenAPI Specs & fern SDKs
We maintain the API specifications manually to guarantee a high degree of understandability. If you made changes to the API, please update the respective `.yml` files in `fern/apis/...`.
To generate the respective `openapi.yml` files which power the online API reference & SDKs, run:
```sh
npx fern-api generate --api server # for the server API
npx fern-api generate --api client # for the client API
npx fern-api generate --api organizations # for the organizations API
```
**Note:** You need a signed in fern account to run those commands.
## License
Langfuse is MIT licensed, except for `ee/` folder. See [LICENSE](LICENSE) and [docs](https://langfuse.com/docs/open-source) for more details.
| [Ollama](https://langfuse.com/docs/integrations/ollama) | 모델 (로컬) | 자신의 컴퓨터에서 오픈 소스 LLM을 손쉽게 실행할 수 있습니다. |
| [Amazon Bedrock](https://langfuse.com/docs/integrations/amazon-bedrock) | 모델 | AWS에서 기본 및 파인튜닝된 모델을 실행합니다. |
| [Google VertexAI and Gemini](https://langfuse.com/docs/integrations/google-vertex-ai) | 모델 | Google에서 기본 및 파인튜닝된 모델을 실행합니다. |
| [AutoGen](https://langfuse.com/docs/integrations/autogen) | 에이전트 프레임워크 | 분산 에이전트 구축을 위한 오픈 소스 LLM 플랫폼입니다. |
| [Flowise](https://langfuse.com/docs/integrations/flowise) | 채팅/에이전트 UI | 맞춤형 LLM 플로우를 위한 JS/TS 코드 없는(no-code) 빌더입니다. |
| [Langflow](https://langfuse.com/docs/integrations/langflow) | 채팅/에이전트 UI | react-flow를 활용하여 실험 및 프로토타이핑을 손쉽게 할 수 있도록 디자인된 LangChain용 Python 기반 UI입니다. |
@@ -201,7 +202,7 @@ LANGFUSE_HOST="https://cloud.langfuse.com" # 🇪🇺 EU region
```
```python:main.py
from langfuse.decorators import observe
from langfuse import observe
from langfuse.openai import openai # OpenAI integration
<span>Langfuse uses <a href="https://github.com/orgs/langfuse/discussions"><strong>Github Discussions</strong></a> for Support and Feature Requests.</span>
<span>Langfuse uses <a href="https://github.com/orgs/langfuse/discussions"><strong>GitHub Discussions</strong></a> for Support and Feature Requests.</span>
<br/>
<span><b>We're hiring.</b> <a href="https://langfuse.com/careers"><strong>Join us</strong></a> in product engineering and technical go-to-market roles.</span>
<br/>
@@ -93,7 +96,7 @@ Langfuse is an **open source LLM engineering** platform. It helps teams collabor
### Langfuse Cloud
Managed deployment by the Langfuse team, generous free-tier (hobby plan), no credit card required.
Managed deployment by the Langfuse team, generous free-tier, no credit card required.
@@ -115,12 +118,11 @@ Run Langfuse on your own infrastructure:
# Run the langfuse docker compose
docker compose up
```
- [Kubernetes (Helm)](https://langfuse.com/self-hosting/kubernetes-helm): Run Langfuse on a Kubernetes cluster using Helm. This is the preferred production deployment.
- [VM](https://langfuse.com/self-hosting/docker-compose): Run Langfuse on a single Virtual Machine using Docker Compose.
- Planned: Cloud-specific deployment guides, please upvote and comment on the following threads: [AWS](https://github.com/orgs/langfuse/discussions/4645), [Google Cloud](https://github.com/orgs/langfuse/discussions/4646), [Azure](https://github.com/orgs/langfuse/discussions/4647).
- [Kubernetes (Helm)](https://langfuse.com/self-hosting/kubernetes-helm): Run Langfuse on a Kubernetes cluster using Helm. This is the preferred production deployment.
docs:The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false)
observationId:optional<string>
comment:optional<string>
metadata:optional<unknown>
dataType:
type:optional<ScoreDataType>
docs:When set, must match the score value's type. If not set, will be inferred from the score value or config
@@ -64,62 +67,15 @@ types:
dataType:"BOOLEAN"
configId:"1234-5678-90ab-cdef"
traceId:"cdef-1234-5678-90ab"
BaseScore:
properties:
id:string
traceId:string
name:string
source:ScoreSource
observationId:optional<string>
timestamp:datetime
createdAt:datetime
updatedAt:datetime
authorUserId:optional<string>
comment:optional<string>
configId:
type:optional<string>
docs:Reference a score config on a score. When set, config and score name must be equal and value must comply to optionally defined numerical range
NumericScore:
extends:BaseScore
properties:
value:
type:double
docs:The numeric value of the score
BooleanScore:
extends:BaseScore
properties:
value:
type:double
docs:The numeric value of the score. Equals 1 for "True" and 0 for "False"
stringValue:
type:string
docs:The string representation of the score value. Is inferred from the numeric value and equals "True" or "False"
CategoricalScore:
extends:BaseScore
properties:
value:
type:optional<double>
docs:Only defined if a config is linked. Represents the numeric category mapping of the stringValue
stringValue:
type:string
docs:The string representation of the score value. If no config is linked, can be any string. Otherwise, must map to a config category
docs:Reference a score config on a score. When set, config and score name must be equal and value must comply to optionally defined numerical range
queueId:
type:optional<string>
docs:Reference an annotation queue on a score. Populated if the score was initially created in an annotation queue.
environment:
type:optional<string>
docs:The environment from which this score originated. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.
NumericScoreV1:
extends:BaseScoreV1
properties:
value:
type:double
docs:The numeric value of the score
BooleanScoreV1:
extends:BaseScoreV1
properties:
value:
type:double
docs:The numeric value of the score. Equals 1 for "True" and 0 for "False"
stringValue:
type:string
docs:The string representation of the score value. Is inferred from the numeric value and equals "True" or "False"
CategoricalScoreV1:
extends:BaseScoreV1
properties:
value:
type:optional<double>
docs:Only defined if a config is linked. Represents the numeric category mapping of the stringValue
stringValue:
type:string
docs:The string representation of the score value. If no config is linked, can be any string. Otherwise, must map to a config category
ScoreV1:
discriminant:"dataType"
union:
NUMERIC:
type:NumericScoreV1
docs:"Score with NUMERIC data type"
CATEGORICAL:
type:CategoricalScoreV1
docs:"Score with CATEGORICAL data type"
BOOLEAN:
type:BooleanScoreV1
docs:"Score with BOOLEAN data type"
BaseScore:
properties:
id:string
traceId:optional<string>
sessionId:optional<string>
observationId:optional<string>
datasetRunId:optional<string>
name:string
source:ScoreSource
timestamp:datetime
createdAt:datetime
updatedAt:datetime
authorUserId:optional<string>
comment:optional<string>
metadata:optional<unknown>
configId:
type:optional<string>
docs:Reference a score config on a score. When set, config and score name must be equal and value must comply to optionally defined numerical range
@@ -395,13 +457,13 @@ types:
docs:Unit used by this model.
type:optional<ModelUsageUnit>
inputPrice:
docs:Price (USD) per input unit
docs:Deprecated. See 'prices' instead. Price (USD) per input unit
type:optional<double>
outputPrice:
docs:Price (USD) per output unit
docs:Deprecated. See 'prices' instead. Price (USD) per output unit
type:optional<double>
totalPrice:
docs:Price (USD) per total unit. Cannot be set if input or output price is set.
docs:Deprecated. See 'prices' instead. Price (USD) per total unit. Cannot be set if input or output price is set.
type:optional<double>
tokenizerId:
docs:Optional. Tokenizer to be applied to observations which match to this model. See docs for more details.
docs:The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false)
observationId:optional<string>
comment:optional<string>
metadata:optional<unknown>
dataType:
type:optional<commons.ScoreDataType>
docs:When set, must match the score value's type. If not set, will be inferred from the score value or config
docs:Get all memberships for the organization associated with the API key (requires organization-scoped API key)
method:GET
path:/organizations/memberships
response:MembershipsResponse
updateOrganizationMembership:
docs:Create or update a membership for the organization associated with the API key (requires organization-scoped API key)
method:PUT
path:/organizations/memberships
request:MembershipRequest
response:MembershipResponse
getProjectMemberships:
docs:Get all memberships for a specific project (requires organization-scoped API key)
method:GET
path:/projects/{projectId}/memberships
path-parameters:
projectId:string
response:MembershipsResponse
updateProjectMembership:
docs:Create or update a membership for a specific project (requires organization-scoped API key). The user must already be a member of the organization.
method:PUT
path:/projects/{projectId}/memberships
path-parameters:
projectId:string
request:MembershipRequest
response:MembershipResponse
getOrganizationProjects:
docs:Get all projects for the organization associated with the API key (requires organization-scoped API key)
docs:Get SCIM Service Provider Configuration (requires organization-scoped API key)
method:GET
path:/ServiceProviderConfig
response:ServiceProviderConfig
getResourceTypes:
docs:Get SCIM Resource Types (requires organization-scoped API key)
method:GET
path:/ResourceTypes
response:ResourceTypesResponse
getSchemas:
docs:Get SCIM Schemas (requires organization-scoped API key)
method:GET
path:/Schemas
response:SchemasResponse
listUsers:
docs:List users in the organization (requires organization-scoped API key)
method:GET
path:/Users
request:
name:ListUsersRequest
query-parameters:
filter:
docs:Filter expression (e.g. userName eq "value")
type:optional<string>
startIndex:
docs:1-based index of the first result to return (default 1)
type:optional<integer>
count:
docs:Maximum number of results to return (default 100)
type:optional<integer>
response:ScimUsersListResponse
createUser:
docs:Create a new user in the organization (requires organization-scoped API key)
method:POST
path:/Users
request:
name:CreateUserRequest
body:
properties:
userName:
docs:User's email address (required)
type:string
name:
docs:User's name information
type:ScimName
emails:
docs:User's email addresses
type:optional<list<ScimEmail>>
active:
docs:Whether the user is active
type:optional<boolean>
password:
docs:Initial password for the user
type:optional<string>
response:ScimUser
getUser:
docs:Get a specific user by ID (requires organization-scoped API key)
method:GET
path:/Users/{userId}
path-parameters:
userId:string
response:ScimUser
deleteUser:
docs:Remove a user from the organization (requires organization-scoped API key). Note that this only removes the user from the organization but does not delete the user entity itself.
docs:Create a score (supports both trace and session scores)
method:POST
path:/scores
request:CreateScoreRequest
response:CreateScoreResponse
get:
docs:Get a list of scores
method:GET
path:/scores
request:
name:GetScoresRequest
query-parameters:
page:
type:optional<integer>
docs:Page number, starts at 1.
limit:
type:optional<integer>
docs:Limit of items per page. If you encounter api issues due to too large page sizes, try to reduce the limit.
userId:
type:optional<string>
docs:Retrieve only scores with this userId associated to the trace.
name:
type:optional<string>
docs:Retrieve only scores with this name.
fromTimestamp:
type:optional<datetime>
docs:Optional filter to only include scores created on or after a certain datetime (ISO 8601)
toTimestamp:
type:optional<datetime>
docs:Optional filter to only include scores created before a certain datetime (ISO 8601)
environment:
type:optional<string>
allow-multiple:true
docs:Optional filter for scores where the environment is one of the provided values.
source:
type:optional<commons.ScoreSource>
docs:Retrieve only scores from a specific source.
operator:
type:optional<string>
docs:Retrieve only scores with <operator> value.
value:
type:optional<double>
docs:Retrieve only scores with <operator> value.
scoreIds:
type:optional<string>
docs:Comma-separated list of score IDs to limit the results to.
configId:
type:optional<string>
docs:Retrieve only scores with a specific configId.
queueId:
type:optional<string>
docs:Retrieve only scores with a specific annotation queueId.
dataType:
type:optional<commons.ScoreDataType>
docs:Retrieve only scores with a specific dataType.
traceTags:
type:optional<string>
allow-multiple:true
docs:Only scores linked to traces that include all of these tags will be returned.
response:GetScoresResponse
get-by-id:
docs:Get a score
method:GET
path:/scores/{scoreId}
path-parameters:
scoreId:
type:string
docs:The unique langfuse identifier of a score
response:commons.Score
delete:
docs:Delete a score
docs:Delete a score (supports both trace and session scores)
method:DELETE
path:/scores/{scoreId}
path-parameters:
@@ -88,13 +24,16 @@ types:
CreateScoreRequest:
properties:
id:optional<string>
traceId:string
traceId:optional<string>
sessionId:optional<string>
observationId:optional<string>
datasetRunId:optional<string>
name:string
value:
type:commons.CreateScoreValue
docs:The value of the score. Must be passed as string for categorical scores, and numeric for boolean and numeric scores. Boolean score values must equal either 1 or 0 (true or false)
observationId:optional<string>
comment:optional<string>
metadata:optional<unknown>
environment:
type:optional<string>
docs:The environment of the score. Can be any lowercase alphanumeric string with hyphens and underscores that does not start with 'langfuse'.
@@ -148,41 +87,3 @@ types:
id:
type:string
docs:The id of the created object in Langfuse
GetScoresResponseTraceData:
properties:
userId:
type:optional<string>
docs:The user ID associated with the trace referenced by score
tags:
type:optional<list<string>>
docs:A list of tags associated with the trace referenced by score
environment:
type:optional<string>
docs:The environment of the trace referenced by score
docs:Optional filter for traces where the environment is one of the provided values.
fields:
type:optional<string>
docs:"Comma-separated list of fields to include in the response. Available field groups are 'core' (always included), 'io' (input, output, metadata), 'scores', 'observations', 'metrics'. If not provided, all fields are included. Example: 'core,scores,metrics'"
"dx":"pnpm i && pnpm run infra:dev:prune && pnpm run infra:dev:up --pull always && pnpm --filter=shared run db:reset && pnpm --filter=shared run ch:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
"dx-f":"pnpm i && pnpm run infra:dev:prune && pnpm run infra:dev:up --pull always && pnpm --filter=shared run db:reset -f && pnpm --filter=shared run ch:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
"dx:skip-infra":"pnpm i && pnpm --filter=shared run db:reset && pnpm --filter=shared run ch:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
"dx":"pnpm i && pnpm run infra:dev:prune && pnpm run infra:dev:up --pull always && pnpm --filter=shared run db:reset:test && pnpm --filter=shared run db:reset && pnpm --filter=shared run ch:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
"dx-f":"pnpm i && pnpm run infra:dev:prune && pnpm run infra:dev:up --pull always && pnpm --filter=shared run db:reset:test && pnpm --filter=shared run db:reset -f && SKIP_CONFIRM=1 pnpm --filter=shared run ch:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
"dx:skip-infra":"pnpm i && pnpm --filter=shared run db:reset:test && pnpm --filter=shared run db:reset && pnpm --filter=shared run ch:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
"build":"turbo run build",
"start":"turbo run start",
"dev":"turbo run dev",
"dev:worker":"turbo run dev --filter=worker",
"dev:web":"turbo run dev --filter=web",
"dev:web-turbo":"turbo run dev --filter=web -- --turbo",
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.