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
28 changes: 24 additions & 4 deletions langfuse/api/sessions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ def list(
request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSessions:
"""
Get sessions
Get sessions.

This legacy endpoint is not recommended for new data extraction workflows.
Use the v2 observations endpoint with a bounded time range and group rows by
`sessionId` instead:
`GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>`.

Parameters
----------
Expand Down Expand Up @@ -93,7 +98,12 @@ def get(
request_options: typing.Optional[RequestOptions] = None,
) -> SessionWithTraces:
"""
Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=<sessionId>`
Get a session.

Please note that `traces` on this endpoint are not paginated. For large
sessions or new data extraction workflows, use the v2 observations endpoint
with a URL-encoded `sessionId` filter and a bounded time range:
`GET /api/public/v2/observations?filter=<sessionId filter>&fromStartTime=<from>&toStartTime=<to>`.

Parameters
----------
Expand Down Expand Up @@ -153,7 +163,12 @@ async def list(
request_options: typing.Optional[RequestOptions] = None,
) -> PaginatedSessions:
"""
Get sessions
Get sessions.

This legacy endpoint is not recommended for new data extraction workflows.
Use the v2 observations endpoint with a bounded time range and group rows by
`sessionId` instead:
`GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>`.

Parameters
----------
Expand Down Expand Up @@ -218,7 +233,12 @@ async def get(
request_options: typing.Optional[RequestOptions] = None,
) -> SessionWithTraces:
"""
Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=<sessionId>`
Get a session.

Please note that `traces` on this endpoint are not paginated. For large
sessions or new data extraction workflows, use the v2 observations endpoint
with a URL-encoded `sessionId` filter and a bounded time range:
`GET /api/public/v2/observations?filter=<sessionId filter>&fromStartTime=<from>&toStartTime=<to>`.

Parameters
----------
Expand Down
28 changes: 24 additions & 4 deletions langfuse/api/sessions/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ def list(
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[PaginatedSessions]:
"""
Get sessions
Get sessions.

This legacy endpoint is not recommended for new data extraction workflows.
Use the v2 observations endpoint with a bounded time range and group rows by
`sessionId` instead:
`GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>`.

Parameters
----------
Expand Down Expand Up @@ -162,7 +167,12 @@ def get(
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[SessionWithTraces]:
"""
Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=<sessionId>`
Get a session.

Please note that `traces` on this endpoint are not paginated. For large
sessions or new data extraction workflows, use the v2 observations endpoint
with a URL-encoded `sessionId` filter and a bounded time range:
`GET /api/public/v2/observations?filter=<sessionId filter>&fromStartTime=<from>&toStartTime=<to>`.

Parameters
----------
Expand Down Expand Up @@ -275,7 +285,12 @@ async def list(
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[PaginatedSessions]:
"""
Get sessions
Get sessions.

This legacy endpoint is not recommended for new data extraction workflows.
Use the v2 observations endpoint with a bounded time range and group rows by
`sessionId` instead:
`GET /api/public/v2/observations?fromStartTime=<from>&toStartTime=<to>`.

Parameters
----------
Expand Down Expand Up @@ -402,7 +417,12 @@ async def get(
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[SessionWithTraces]:
"""
Get a session. Please note that `traces` on this endpoint are not paginated, if you plan to fetch large sessions, consider `GET /api/public/traces?sessionId=<sessionId>`
Get a session.

Please note that `traces` on this endpoint are not paginated. For large
sessions or new data extraction workflows, use the v2 observations endpoint
with a URL-encoded `sessionId` filter and a bounded time range:
`GET /api/public/v2/observations?filter=<sessionId filter>&fromStartTime=<from>&toStartTime=<to>`.

Parameters
----------
Expand Down