chore: 添加虚拟环境到仓库
- 添加 backend_service/venv 虚拟环境 - 包含所有Python依赖包 - 注意:虚拟环境约393MB,包含12655个文件
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# Copyright (c) Alibaba, Inc. and its affiliates.
|
||||
|
||||
from dashscope.api_entities.dashscope_response import DashScopeAPIResponse
|
||||
from dashscope.client.base_api import GetMixin, ListMixin
|
||||
|
||||
|
||||
class Model(ListMixin, GetMixin):
|
||||
SUB_PATH = 'models'
|
||||
|
||||
@classmethod
|
||||
def get(cls,
|
||||
name: str,
|
||||
api_key: str = None,
|
||||
workspace: str = None,
|
||||
**kwargs) -> DashScopeAPIResponse:
|
||||
"""Get the model information.
|
||||
|
||||
Args:
|
||||
name (str): The model name.
|
||||
api_key (str, optional): The api key. Defaults to None.
|
||||
workspace (str): The dashscope workspace id.
|
||||
|
||||
Returns:
|
||||
DashScopeAPIResponse: The model information.
|
||||
"""
|
||||
return super().get(name, api_key, workspace=workspace, **kwargs)
|
||||
|
||||
@classmethod
|
||||
def list(cls,
|
||||
page=1,
|
||||
page_size=10,
|
||||
api_key: str = None,
|
||||
workspace: str = None,
|
||||
**kwargs) -> DashScopeAPIResponse:
|
||||
"""List models.
|
||||
|
||||
Args:
|
||||
api_key (str, optional): The api key
|
||||
page (int, optional): Page number. Defaults to 1.
|
||||
page_size (int, optional): Items per page. Defaults to 10.
|
||||
|
||||
Returns:
|
||||
DashScopeAPIResponse: The models.
|
||||
"""
|
||||
return super().list(api_key,
|
||||
page,
|
||||
page_size,
|
||||
workspace=workspace,
|
||||
**kwargs)
|
||||
Reference in New Issue
Block a user