Skip to content

Commit 47a00f9

Browse files
authored
Merge pull request #16 from JigsawStack/check
chore:make list params optional
2 parents 2cd1ffe + 61a7257 commit 47a00f9

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
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')

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name="jigsawstack",
9-
version="0.1.10",
9+
version="0.1.11",
1010
description="JigsawStack Python SDK",
1111
long_description=open("README.md", encoding="utf8").read(),
1212
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)