Skip to content

Commit b80e37b

Browse files
author
langfuse-bot
committed
feat(api): update API spec from langfuse/langfuse 8c1e50a
1 parent 5974a46 commit b80e37b

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

langfuse/api/reference.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3743,8 +3743,9 @@ Example: "key1,key2"
37433743

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

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

37493750
</dd>
37503751
</dl>
@@ -7207,6 +7208,14 @@ client.score_v_2.get()
72077208
<dl>
72087209
<dd>
72097210

7211+
**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.
7212+
7213+
</dd>
7214+
</dl>
7215+
7216+
<dl>
7217+
<dd>
7218+
72107219
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
72117220

72127221
</dd>

langfuse/api/resources/observations_v_2/client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ def get_many(
9090
Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page.
9191
9292
parse_io_as_json : typing.Optional[bool]
93-
Set to `true` to parse input/output fields as JSON, or `false` to return raw strings.
94-
Defaults to `false` if not provided.
93+
**Deprecated.** Setting this to `true` will return a 400 error.
94+
Input/output fields are always returned as raw strings.
95+
Remove this parameter or set it to `false`.
9596
9697
name : typing.Optional[str]
9798
@@ -364,8 +365,9 @@ async def get_many(
364365
Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page.
365366
366367
parse_io_as_json : typing.Optional[bool]
367-
Set to `true` to parse input/output fields as JSON, or `false` to return raw strings.
368-
Defaults to `false` if not provided.
368+
**Deprecated.** Setting this to `true` will return a 400 error.
369+
Input/output fields are always returned as raw strings.
370+
Remove this parameter or set it to `false`.
369371
370372
name : typing.Optional[str]
371373

langfuse/api/resources/score_v_2/client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def get(
4848
data_type: typing.Optional[ScoreDataType] = None,
4949
trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
5050
fields: typing.Optional[str] = None,
51+
filter: typing.Optional[str] = None,
5152
request_options: typing.Optional[RequestOptions] = None,
5253
) -> GetScoresResponse:
5354
"""
@@ -115,6 +116,9 @@ def get(
115116
fields : typing.Optional[str]
116117
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.
117118
119+
filter : typing.Optional[str]
120+
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.
121+
118122
request_options : typing.Optional[RequestOptions]
119123
Request-specific configuration.
120124
@@ -164,6 +168,7 @@ def get(
164168
"dataType": data_type,
165169
"traceTags": trace_tags,
166170
"fields": fields,
171+
"filter": filter,
167172
},
168173
request_options=request_options,
169174
)
@@ -286,6 +291,7 @@ async def get(
286291
data_type: typing.Optional[ScoreDataType] = None,
287292
trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
288293
fields: typing.Optional[str] = None,
294+
filter: typing.Optional[str] = None,
289295
request_options: typing.Optional[RequestOptions] = None,
290296
) -> GetScoresResponse:
291297
"""
@@ -353,6 +359,9 @@ async def get(
353359
fields : typing.Optional[str]
354360
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.
355361
362+
filter : typing.Optional[str]
363+
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.
364+
356365
request_options : typing.Optional[RequestOptions]
357366
Request-specific configuration.
358367
@@ -410,6 +419,7 @@ async def main() -> None:
410419
"dataType": data_type,
411420
"traceTags": trace_tags,
412421
"fields": fields,
422+
"filter": filter,
413423
},
414424
request_options=request_options,
415425
)

0 commit comments

Comments
 (0)