Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions langfuse/api/scores/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def get_many(
request_options: typing.Optional[RequestOptions] = None,
) -> GetScoresResponse:
"""
**Deprecated.** Use `GET /api/public/v3/scores` instead. This endpoint
is no longer available on Langfuse v4 and later.

Get a list of scores (supports both trace and session scores)

Parameters
Expand Down Expand Up @@ -172,6 +175,9 @@ def get_by_id(
self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> Score:
"""
**Deprecated.** Use `GET /api/public/v3/scores` with the `id` filter
instead. This endpoint is no longer available on Langfuse v4 and later.

Get a score (supports both trace and session scores)

Parameters
Expand Down Expand Up @@ -250,6 +256,9 @@ async def get_many(
request_options: typing.Optional[RequestOptions] = None,
) -> GetScoresResponse:
"""
**Deprecated.** Use `GET /api/public/v3/scores` instead. This endpoint
is no longer available on Langfuse v4 and later.

Get a list of scores (supports both trace and session scores)

Parameters
Expand Down Expand Up @@ -376,6 +385,9 @@ async def get_by_id(
self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> Score:
"""
**Deprecated.** Use `GET /api/public/v3/scores` with the `id` filter
instead. This endpoint is no longer available on Langfuse v4 and later.

Get a score (supports both trace and session scores)

Parameters
Expand Down
12 changes: 12 additions & 0 deletions langfuse/api/scores/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ def get_many(
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[GetScoresResponse]:
"""
**Deprecated.** Use `GET /api/public/v3/scores` instead. This endpoint
is no longer available on Langfuse v4 and later.

Get a list of scores (supports both trace and session scores)

Parameters
Expand Down Expand Up @@ -241,6 +244,9 @@ def get_by_id(
self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[Score]:
"""
**Deprecated.** Use `GET /api/public/v3/scores` with the `id` filter
instead. This endpoint is no longer available on Langfuse v4 and later.

Get a score (supports both trace and session scores)

Parameters
Expand Down Expand Up @@ -370,6 +376,9 @@ async def get_many(
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[GetScoresResponse]:
"""
**Deprecated.** Use `GET /api/public/v3/scores` instead. This endpoint
is no longer available on Langfuse v4 and later.

Get a list of scores (supports both trace and session scores)

Parameters
Expand Down Expand Up @@ -558,6 +567,9 @@ async def get_by_id(
self, score_id: str, *, request_options: typing.Optional[RequestOptions] = None
) -> AsyncHttpResponse[Score]:
"""
**Deprecated.** Use `GET /api/public/v3/scores` with the `id` filter
instead. This endpoint is no longer available on Langfuse v4 and later.

Get a score (supports both trace and session scores)

Parameters
Expand Down
34 changes: 24 additions & 10 deletions langfuse/api/scores_v3/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,22 @@ def get_many_v3(
"""
Get a list of scores with a polymorphic `value` field (v3).

This endpoint requires Langfuse v4 or later.

The `value` field type depends on `dataType`:
- `NUMERIC` → number
- `BOOLEAN` → boolean
- `CATEGORICAL`, `TEXT`, `CORRECTION` → string

Use the `fields` parameter to include optional field groups beyond the
default `core`. Unknown group names return HTTP 400.
The response always includes the core fields: id, projectId, name,
value, dataType, source, timestamp, environment, createdAt, updatedAt.

Additional field groups can be requested via the `fields` parameter:
- `details` — adds comment, configId, metadata
- `subject` — adds the subject object describing the entity the score
is attached to: kind (trace, observation, session, or experiment),
id, and traceId for observation-level scores
- `annotation` — adds authorUserId, queueId

Unknown group names return HTTP 400.

Parameters
----------
Expand All @@ -71,7 +78,7 @@ def get_many_v3(
URL-safe base64 (base64url) cursor for pagination. Use the cursor from the previous response to get the next page. Absent on the final page.

fields : typing.Optional[str]
Comma-separated field groups to include. Allowed: core, details, subject, annotation. Defaults to "core". Unknown names return HTTP 400.
Comma-separated field groups to include in addition to the always-returned core fields. Allowed: details, subject, annotation — see the endpoint description for the fields each group adds. Unknown names return HTTP 400.

id : typing.Optional[str]
Comma-separated list of score IDs to filter by (OR within, AND across filters).
Expand Down Expand Up @@ -214,15 +221,22 @@ async def get_many_v3(
"""
Get a list of scores with a polymorphic `value` field (v3).

This endpoint requires Langfuse v4 or later.

The `value` field type depends on `dataType`:
- `NUMERIC` → number
- `BOOLEAN` → boolean
- `CATEGORICAL`, `TEXT`, `CORRECTION` → string

Use the `fields` parameter to include optional field groups beyond the
default `core`. Unknown group names return HTTP 400.
The response always includes the core fields: id, projectId, name,
value, dataType, source, timestamp, environment, createdAt, updatedAt.

Additional field groups can be requested via the `fields` parameter:
- `details` — adds comment, configId, metadata
- `subject` — adds the subject object describing the entity the score
is attached to: kind (trace, observation, session, or experiment),
id, and traceId for observation-level scores
- `annotation` — adds authorUserId, queueId

Unknown group names return HTTP 400.

Parameters
----------
Expand All @@ -233,7 +247,7 @@ async def get_many_v3(
URL-safe base64 (base64url) cursor for pagination. Use the cursor from the previous response to get the next page. Absent on the final page.

fields : typing.Optional[str]
Comma-separated field groups to include. Allowed: core, details, subject, annotation. Defaults to "core". Unknown names return HTTP 400.
Comma-separated field groups to include in addition to the always-returned core fields. Allowed: details, subject, annotation — see the endpoint description for the fields each group adds. Unknown names return HTTP 400.

id : typing.Optional[str]
Comma-separated list of score IDs to filter by (OR within, AND across filters).
Expand Down
34 changes: 24 additions & 10 deletions langfuse/api/scores_v3/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,22 @@ def get_many_v3(
"""
Get a list of scores with a polymorphic `value` field (v3).

This endpoint requires Langfuse v4 or later.

The `value` field type depends on `dataType`:
- `NUMERIC` → number
- `BOOLEAN` → boolean
- `CATEGORICAL`, `TEXT`, `CORRECTION` → string

Use the `fields` parameter to include optional field groups beyond the
default `core`. Unknown group names return HTTP 400.
The response always includes the core fields: id, projectId, name,
value, dataType, source, timestamp, environment, createdAt, updatedAt.

Additional field groups can be requested via the `fields` parameter:
- `details` — adds comment, configId, metadata
- `subject` — adds the subject object describing the entity the score
is attached to: kind (trace, observation, session, or experiment),
id, and traceId for observation-level scores
- `annotation` — adds authorUserId, queueId

Unknown group names return HTTP 400.

Parameters
----------
Expand All @@ -69,7 +76,7 @@ def get_many_v3(
URL-safe base64 (base64url) cursor for pagination. Use the cursor from the previous response to get the next page. Absent on the final page.

fields : typing.Optional[str]
Comma-separated field groups to include. Allowed: core, details, subject, annotation. Defaults to "core". Unknown names return HTTP 400.
Comma-separated field groups to include in addition to the always-returned core fields. Allowed: details, subject, annotation — see the endpoint description for the fields each group adds. Unknown names return HTTP 400.

id : typing.Optional[str]
Comma-separated list of score IDs to filter by (OR within, AND across filters).
Expand Down Expand Up @@ -271,15 +278,22 @@ async def get_many_v3(
"""
Get a list of scores with a polymorphic `value` field (v3).

This endpoint requires Langfuse v4 or later.

The `value` field type depends on `dataType`:
- `NUMERIC` → number
- `BOOLEAN` → boolean
- `CATEGORICAL`, `TEXT`, `CORRECTION` → string

Use the `fields` parameter to include optional field groups beyond the
default `core`. Unknown group names return HTTP 400.
The response always includes the core fields: id, projectId, name,
value, dataType, source, timestamp, environment, createdAt, updatedAt.

Additional field groups can be requested via the `fields` parameter:
- `details` — adds comment, configId, metadata
- `subject` — adds the subject object describing the entity the score
is attached to: kind (trace, observation, session, or experiment),
id, and traceId for observation-level scores
- `annotation` — adds authorUserId, queueId

Unknown group names return HTTP 400.

Parameters
----------
Expand All @@ -290,7 +304,7 @@ async def get_many_v3(
URL-safe base64 (base64url) cursor for pagination. Use the cursor from the previous response to get the next page. Absent on the final page.

fields : typing.Optional[str]
Comma-separated field groups to include. Allowed: core, details, subject, annotation. Defaults to "core". Unknown names return HTTP 400.
Comma-separated field groups to include in addition to the always-returned core fields. Allowed: details, subject, annotation — see the endpoint description for the fields each group adds. Unknown names return HTTP 400.

id : typing.Optional[str]
Comma-separated list of score IDs to filter by (OR within, AND across filters).
Expand Down