Skip to content
Open
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
13 changes: 11 additions & 2 deletions langfuse/api/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3743,8 +3743,9 @@ Example: "key1,key2"

**parse_io_as_json:** `typing.Optional[bool]`

Set to `true` to parse input/output fields as JSON, or `false` to return raw strings.
Defaults to `false` if not provided.
**Deprecated.** Setting this to `true` will return a 400 error.
Input/output fields are always returned as raw strings.
Remove this parameter or set it to `false`.

</dd>
</dl>
Expand Down Expand Up @@ -7207,6 +7208,14 @@ client.score_v_2.get()
<dl>
<dd>

**filter:** `typing.Optional[str]` — A JSON stringified array of filter objects. Each object requires type, column, operator, and value. Supports filtering by score metadata using the stringObject type. Example: [{"type":"stringObject","column":"metadata","key":"user_id","operator":"=","value":"abc123"}]. Supported types: stringObject (metadata key-value filtering), string, number, datetime, stringOptions, arrayOptions. Supported operators for stringObject: =, contains, does not contain, starts with, ends with.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
Expand Down
10 changes: 6 additions & 4 deletions langfuse/api/resources/observations_v_2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ def get_many(
Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page.

parse_io_as_json : typing.Optional[bool]
Set to `true` to parse input/output fields as JSON, or `false` to return raw strings.
Defaults to `false` if not provided.
**Deprecated.** Setting this to `true` will return a 400 error.
Input/output fields are always returned as raw strings.
Remove this parameter or set it to `false`.

name : typing.Optional[str]

Expand Down Expand Up @@ -364,8 +365,9 @@ async def get_many(
Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page.

parse_io_as_json : typing.Optional[bool]
Set to `true` to parse input/output fields as JSON, or `false` to return raw strings.
Defaults to `false` if not provided.
**Deprecated.** Setting this to `true` will return a 400 error.
Input/output fields are always returned as raw strings.
Remove this parameter or set it to `false`.

name : typing.Optional[str]

Expand Down
10 changes: 10 additions & 0 deletions langfuse/api/resources/score_v_2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def get(
data_type: typing.Optional[ScoreDataType] = None,
trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
fields: typing.Optional[str] = None,
filter: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> GetScoresResponse:
"""
Expand Down Expand Up @@ -115,6 +116,9 @@ def get(
fields : typing.Optional[str]
Comma-separated list of field groups to include in the response. Available field groups: 'score' (core score fields), 'trace' (trace properties: userId, tags, environment). If not specified, both 'score' and 'trace' are returned by default. Example: 'score' to exclude trace data, 'score,trace' to include both. Note: When filtering by trace properties (using userId or traceTags parameters), the 'trace' field group must be included, otherwise a 400 error will be returned.

filter : typing.Optional[str]
A JSON stringified array of filter objects. Each object requires type, column, operator, and value. Supports filtering by score metadata using the stringObject type. Example: [{"type":"stringObject","column":"metadata","key":"user_id","operator":"=","value":"abc123"}]. Supported types: stringObject (metadata key-value filtering), string, number, datetime, stringOptions, arrayOptions. Supported operators for stringObject: =, contains, does not contain, starts with, ends with.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -164,6 +168,7 @@ def get(
"dataType": data_type,
"traceTags": trace_tags,
"fields": fields,
"filter": filter,
},
request_options=request_options,
)
Expand Down Expand Up @@ -286,6 +291,7 @@ async def get(
data_type: typing.Optional[ScoreDataType] = None,
trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
fields: typing.Optional[str] = None,
filter: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
) -> GetScoresResponse:
"""
Expand Down Expand Up @@ -353,6 +359,9 @@ async def get(
fields : typing.Optional[str]
Comma-separated list of field groups to include in the response. Available field groups: 'score' (core score fields), 'trace' (trace properties: userId, tags, environment). If not specified, both 'score' and 'trace' are returned by default. Example: 'score' to exclude trace data, 'score,trace' to include both. Note: When filtering by trace properties (using userId or traceTags parameters), the 'trace' field group must be included, otherwise a 400 error will be returned.

filter : typing.Optional[str]
A JSON stringified array of filter objects. Each object requires type, column, operator, and value. Supports filtering by score metadata using the stringObject type. Example: [{"type":"stringObject","column":"metadata","key":"user_id","operator":"=","value":"abc123"}]. Supported types: stringObject (metadata key-value filtering), string, number, datetime, stringOptions, arrayOptions. Supported operators for stringObject: =, contains, does not contain, starts with, ends with.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -410,6 +419,7 @@ async def main() -> None:
"dataType": data_type,
"traceTags": trace_tags,
"fields": fields,
"filter": filter,
},
request_options=request_options,
)
Expand Down
Loading