Skip to content

Commit ff8aa73

Browse files
authored
fix: rename the API parameter self to self_only to avoid python conflict (#21)
1 parent 34c7866 commit ff8aa73

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/fish_audio_sdk/apis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def list_models(
5252
page_number: int = 1,
5353
title: str | None = None,
5454
tag: list[str] | str | None = None,
55-
self: bool = False,
55+
self_only: bool = False,
5656
author_id: str | None = None,
5757
language: list[str] | str | None = None,
5858
title_language: list[str] | str | None = None,
@@ -67,7 +67,7 @@ def list_models(
6767
"page_number": page_number,
6868
"title": title,
6969
"tag": tag,
70-
"self": self,
70+
"self": self_only,
7171
"author_id": author_id,
7272
"language": language,
7373
"title_language": title_language,

tests/test_apis.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ async def test_list_models_async(session: Session):
5050
assert res.total > 0
5151

5252

53+
def test_list_self_models(session: Session):
54+
res = session.list_models(self_only=True)
55+
assert res.total > 0
56+
57+
5358
def test_get_model(session: Session):
5459
res = session.get_model(model_id="7f92f8afb8ec43bf81429cc1c9199cb1")
5560
assert res.id == "7f92f8afb8ec43bf81429cc1c9199cb1"

0 commit comments

Comments
 (0)