Skip to content

Commit e0fe3cc

Browse files
author
langfuse-bot
committed
feat(api): update API spec from langfuse/langfuse 784ab09
1 parent df63577 commit e0fe3cc

File tree

4 files changed

+32
-8
lines changed

4 files changed

+32
-8
lines changed

langfuse/api/observations_v2/client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ def get_many(
9393
Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page.
9494
9595
parse_io_as_json : typing.Optional[bool]
96-
Set to `true` to parse input/output fields as JSON, or `false` to return raw strings.
97-
Defaults to `false` if not provided.
96+
**Deprecated.** Setting this to `true` will return a 400 error.
97+
Input/output fields are always returned as raw strings.
98+
Remove this parameter or set it to `false`.
9899
99100
name : typing.Optional[str]
100101
@@ -344,8 +345,9 @@ async def get_many(
344345
Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page.
345346
346347
parse_io_as_json : typing.Optional[bool]
347-
Set to `true` to parse input/output fields as JSON, or `false` to return raw strings.
348-
Defaults to `false` if not provided.
348+
**Deprecated.** Setting this to `true` will return a 400 error.
349+
Input/output fields are always returned as raw strings.
350+
Remove this parameter or set it to `false`.
349351
350352
name : typing.Optional[str]
351353

langfuse/api/observations_v2/raw_client.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@ def get_many(
9191
Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page.
9292
9393
parse_io_as_json : typing.Optional[bool]
94-
Set to `true` to parse input/output fields as JSON, or `false` to return raw strings.
95-
Defaults to `false` if not provided.
94+
**Deprecated.** Setting this to `true` will return a 400 error.
95+
Input/output fields are always returned as raw strings.
96+
Remove this parameter or set it to `false`.
9697
9798
name : typing.Optional[str]
9899
@@ -401,8 +402,9 @@ async def get_many(
401402
Base64-encoded cursor for pagination. Use the cursor from the previous response to get the next page.
402403
403404
parse_io_as_json : typing.Optional[bool]
404-
Set to `true` to parse input/output fields as JSON, or `false` to return raw strings.
405-
Defaults to `false` if not provided.
405+
**Deprecated.** Setting this to `true` will return a 400 error.
406+
Input/output fields are always returned as raw strings.
407+
Remove this parameter or set it to `false`.
406408
407409
name : typing.Optional[str]
408410

langfuse/api/score_v2/client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def get(
5050
data_type: typing.Optional[ScoreDataType] = None,
5151
trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
5252
fields: typing.Optional[str] = None,
53+
filter: typing.Optional[str] = None,
5354
request_options: typing.Optional[RequestOptions] = None,
5455
) -> GetScoresResponse:
5556
"""
@@ -117,6 +118,9 @@ def get(
117118
fields : typing.Optional[str]
118119
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.
119120
121+
filter : typing.Optional[str]
122+
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.
123+
120124
request_options : typing.Optional[RequestOptions]
121125
Request-specific configuration.
122126
@@ -159,6 +163,7 @@ def get(
159163
data_type=data_type,
160164
trace_tags=trace_tags,
161165
fields=fields,
166+
filter=filter,
162167
request_options=request_options,
163168
)
164169
return _response.data
@@ -241,6 +246,7 @@ async def get(
241246
data_type: typing.Optional[ScoreDataType] = None,
242247
trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
243248
fields: typing.Optional[str] = None,
249+
filter: typing.Optional[str] = None,
244250
request_options: typing.Optional[RequestOptions] = None,
245251
) -> GetScoresResponse:
246252
"""
@@ -308,6 +314,9 @@ async def get(
308314
fields : typing.Optional[str]
309315
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.
310316
317+
filter : typing.Optional[str]
318+
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.
319+
311320
request_options : typing.Optional[RequestOptions]
312321
Request-specific configuration.
313322
@@ -358,6 +367,7 @@ async def main() -> None:
358367
data_type=data_type,
359368
trace_tags=trace_tags,
360369
fields=fields,
370+
filter=filter,
361371
request_options=request_options,
362372
)
363373
return _response.data

langfuse/api/score_v2/raw_client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def get(
4949
data_type: typing.Optional[ScoreDataType] = None,
5050
trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
5151
fields: typing.Optional[str] = None,
52+
filter: typing.Optional[str] = None,
5253
request_options: typing.Optional[RequestOptions] = None,
5354
) -> HttpResponse[GetScoresResponse]:
5455
"""
@@ -116,6 +117,9 @@ def get(
116117
fields : typing.Optional[str]
117118
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.
118119
120+
filter : typing.Optional[str]
121+
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.
122+
119123
request_options : typing.Optional[RequestOptions]
120124
Request-specific configuration.
121125
@@ -151,6 +155,7 @@ def get(
151155
"dataType": data_type,
152156
"traceTags": trace_tags,
153157
"fields": fields,
158+
"filter": filter,
154159
},
155160
request_options=request_options,
156161
)
@@ -361,6 +366,7 @@ async def get(
361366
data_type: typing.Optional[ScoreDataType] = None,
362367
trace_tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
363368
fields: typing.Optional[str] = None,
369+
filter: typing.Optional[str] = None,
364370
request_options: typing.Optional[RequestOptions] = None,
365371
) -> AsyncHttpResponse[GetScoresResponse]:
366372
"""
@@ -428,6 +434,9 @@ async def get(
428434
fields : typing.Optional[str]
429435
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.
430436
437+
filter : typing.Optional[str]
438+
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.
439+
431440
request_options : typing.Optional[RequestOptions]
432441
Request-specific configuration.
433442
@@ -463,6 +472,7 @@ async def get(
463472
"dataType": data_type,
464473
"traceTags": trace_tags,
465474
"fields": fields,
475+
"filter": filter,
466476
},
467477
request_options=request_options,
468478
)

0 commit comments

Comments
 (0)