Skip to content

Commit

Permalink
修改请求参数为可选
Browse files Browse the repository at this point in the history
  • Loading branch information
fangweimin committed Dec 29, 2023
1 parent 16a98cb commit f821fec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion appbuilder/utils/model_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def __init__(self,
"""
self.http_client = HTTPClient(secret_key, gateway)

def list(self, request: GetModelListRequest, timeout: float = None,
def list(self, request: GetModelListRequest = None, timeout: float = None,
retry: int = 0) -> GetModelListResponse:
"""
返回用户的模型列表信息。
Expand All @@ -205,6 +205,8 @@ def list(self, request: GetModelListRequest, timeout: float = None,
obj:`GetModelListResponse`: 模型列表返回体。
"""
url = self.http_client.service_url("/v1/bce/wenxinworkshop/service/list")
if request is None:
request = GetModelListRequest()
data = GetModelListRequest.to_json(request)
headers = self.http_client.auth_header()
headers['content-type'] = 'application/json'
Expand Down

0 comments on commit f821fec

Please sign in to comment.