Skip to content

Commit 9ce6369

Browse files
committed
chore:make list params optional
1 parent bb1d10d commit 9ce6369

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

jigsawstack/prompt_engine.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,17 @@ def get(self, id:str) -> PromptEngineGetResponse:
7373
path=path,params={},verb="get").perform_with_content()
7474
return resp
7575

76-
def list(self, params:PromptEngineListParams) -> PromptEngineListResponse:
76+
def list(self, params:Union[PromptEngineListParams, None] = None) -> PromptEngineListResponse:
7777

78-
if params.get('limit') is None:
78+
if params is None:
79+
params = {}
80+
81+
# Default limit and page to 20 and 1 respectively
82+
if params.get('limit') is None:
7983
params['limit'] = 20
8084

8185
if params.get('page') is None:
82-
params['page'] = 1
86+
params['page'] = 0
8387

8488

8589
limit = params.get('limit')

0 commit comments

Comments
 (0)