Skip to content

Commit f17168f

Browse files
committed
fix empty response
1 parent 844541a commit f17168f

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

langfuse/api/reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4482,7 +4482,7 @@ client.organizations.get_organization_api_keys()
44824482
<dl>
44834483
<dd>
44844484

4485-
Get Project associated with API key
4485+
Get Project associated with API key (requires project-scoped API key). You can use GET /api/public/organizations/projects to get all projects with an organization-scoped key.
44864486
</dd>
44874487
</dl>
44884488
</dd>
@@ -5477,7 +5477,7 @@ client.prompts.create(
54775477
<dl>
54785478
<dd>
54795479

5480-
Delete a prompt or specific versions
5480+
Delete prompt versions. If neither version nor label is specified, all versions of the prompt are deleted.
54815481
</dd>
54825482
</dl>
54835483
</dd>
@@ -5528,15 +5528,15 @@ client.prompts.delete(
55285528
<dl>
55295529
<dd>
55305530

5531-
**label:** `typing.Optional[str]` — Optional label of the prompt to delete
5531+
**label:** `typing.Optional[str]` — Optional label to filter deletion. If specified, deletes all prompt versions that have this label.
55325532

55335533
</dd>
55345534
</dl>
55355535

55365536
<dl>
55375537
<dd>
55385538

5539-
**version:** `typing.Optional[int]` — Optional version of the prompt to delete
5539+
**version:** `typing.Optional[int]` — Optional version to filter deletion. If specified, deletes only this specific version of the prompt.
55405540

55415541
</dd>
55425542
</dl>

langfuse/api/resources/projects/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def get(
3232
self, *, request_options: typing.Optional[RequestOptions] = None
3333
) -> Projects:
3434
"""
35-
Get Project associated with API key
35+
Get Project associated with API key (requires project-scoped API key). You can use GET /api/public/organizations/projects to get all projects with an organization-scoped key.
3636
3737
Parameters
3838
----------
@@ -545,7 +545,7 @@ async def get(
545545
self, *, request_options: typing.Optional[RequestOptions] = None
546546
) -> Projects:
547547
"""
548-
Get Project associated with API key
548+
Get Project associated with API key (requires project-scoped API key). You can use GET /api/public/organizations/projects to get all projects with an organization-scoped key.
549549
550550
Parameters
551551
----------

langfuse/api/resources/prompts/client.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from ..commons.errors.method_not_allowed_error import MethodNotAllowedError
1616
from ..commons.errors.not_found_error import NotFoundError
1717
from ..commons.errors.unauthorized_error import UnauthorizedError
18-
from ..scim.types.empty_response import EmptyResponse
1918
from .types.create_prompt_request import CreatePromptRequest
2019
from .types.prompt import Prompt
2120
from .types.prompt_meta_list_response import PromptMetaListResponse
@@ -300,27 +299,27 @@ def delete(
300299
label: typing.Optional[str] = None,
301300
version: typing.Optional[int] = None,
302301
request_options: typing.Optional[RequestOptions] = None,
303-
) -> EmptyResponse:
302+
) -> None:
304303
"""
305-
Delete a prompt or specific versions
304+
Delete prompt versions. If neither version nor label is specified, all versions of the prompt are deleted.
306305
307306
Parameters
308307
----------
309308
prompt_name : str
310309
The name of the prompt
311310
312311
label : typing.Optional[str]
313-
Optional label of the prompt to delete
312+
Optional label to filter deletion. If specified, deletes all prompt versions that have this label.
314313
315314
version : typing.Optional[int]
316-
Optional version of the prompt to delete
315+
Optional version to filter deletion. If specified, deletes only this specific version of the prompt.
317316
318317
request_options : typing.Optional[RequestOptions]
319318
Request-specific configuration.
320319
321320
Returns
322321
-------
323-
EmptyResponse
322+
None
324323
325324
Examples
326325
--------
@@ -346,7 +345,7 @@ def delete(
346345
)
347346
try:
348347
if 200 <= _response.status_code < 300:
349-
return pydantic_v1.parse_obj_as(EmptyResponse, _response.json()) # type: ignore
348+
return
350349
if _response.status_code == 400:
351350
raise Error(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
352351
if _response.status_code == 401:
@@ -671,27 +670,27 @@ async def delete(
671670
label: typing.Optional[str] = None,
672671
version: typing.Optional[int] = None,
673672
request_options: typing.Optional[RequestOptions] = None,
674-
) -> EmptyResponse:
673+
) -> None:
675674
"""
676-
Delete a prompt or specific versions
675+
Delete prompt versions. If neither version nor label is specified, all versions of the prompt are deleted.
677676
678677
Parameters
679678
----------
680679
prompt_name : str
681680
The name of the prompt
682681
683682
label : typing.Optional[str]
684-
Optional label of the prompt to delete
683+
Optional label to filter deletion. If specified, deletes all prompt versions that have this label.
685684
686685
version : typing.Optional[int]
687-
Optional version of the prompt to delete
686+
Optional version to filter deletion. If specified, deletes only this specific version of the prompt.
688687
689688
request_options : typing.Optional[RequestOptions]
690689
Request-specific configuration.
691690
692691
Returns
693692
-------
694-
EmptyResponse
693+
None
695694
696695
Examples
697696
--------
@@ -725,7 +724,7 @@ async def main() -> None:
725724
)
726725
try:
727726
if 200 <= _response.status_code < 300:
728-
return pydantic_v1.parse_obj_as(EmptyResponse, _response.json()) # type: ignore
727+
return
729728
if _response.status_code == 400:
730729
raise Error(pydantic_v1.parse_obj_as(typing.Any, _response.json())) # type: ignore
731730
if _response.status_code == 401:

0 commit comments

Comments
 (0)