mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
client: regenerate from hanzo-inc/cloud@470b2430b9 (8.5.550)
Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
ref=51c17eaeb5524f4e770603eb75fb2f4129f47d85
|
||||
sha256=83947035c0653c8c2f95acca1ed17e5d212c6d014d1c40927ad2920baa5712b0
|
||||
ref=470b2430b9cf39145f26b1da1af3bd83790fc8ec
|
||||
sha256=c9b60004fb0881610a64b54664bf3f740f6ad79e9f589856218e559f3380ee34
|
||||
repo=hanzo-inc/cloud
|
||||
path=openapi.yaml
|
||||
|
||||
@@ -69653,6 +69653,258 @@ class AiApi:
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def post_audio_transcriptions_public(
|
||||
self,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> OpenaiAudioResponse:
|
||||
"""Transcribes up to a minute of audio for a caller with no account, on Hanzo's own transcriber, within a daily allowance per visitor.
|
||||
|
||||
Transcribes up to a minute of audio for a caller with no account, on Hanzo's own transcriber, within a daily allowance per visitor.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._post_audio_transcriptions_public_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "OpenaiAudioResponse",
|
||||
'401': None,
|
||||
'403': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
).data
|
||||
|
||||
|
||||
@validate_call
|
||||
def post_audio_transcriptions_public_with_http_info(
|
||||
self,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[OpenaiAudioResponse]:
|
||||
"""Transcribes up to a minute of audio for a caller with no account, on Hanzo's own transcriber, within a daily allowance per visitor.
|
||||
|
||||
Transcribes up to a minute of audio for a caller with no account, on Hanzo's own transcriber, within a daily allowance per visitor.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._post_audio_transcriptions_public_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "OpenaiAudioResponse",
|
||||
'401': None,
|
||||
'403': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
response_data.read()
|
||||
return self.api_client.response_deserialize(
|
||||
response_data=response_data,
|
||||
response_types_map=_response_types_map,
|
||||
)
|
||||
|
||||
|
||||
@validate_call
|
||||
def post_audio_transcriptions_public_without_preload_content(
|
||||
self,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Tuple[
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
Annotated[StrictFloat, Field(gt=0)]
|
||||
]
|
||||
] = None,
|
||||
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""Transcribes up to a minute of audio for a caller with no account, on Hanzo's own transcriber, within a daily allowance per visitor.
|
||||
|
||||
Transcribes up to a minute of audio for a caller with no account, on Hanzo's own transcriber, within a daily allowance per visitor.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
timeout. It can also be a pair (tuple) of
|
||||
(connection, read) timeouts.
|
||||
:type _request_timeout: int, tuple(int, int), optional
|
||||
:param _request_auth: set to override the auth_settings for an a single
|
||||
request; this effectively ignores the
|
||||
authentication in the spec for a single request.
|
||||
:type _request_auth: dict, optional
|
||||
:param _content_type: force content-type for the request.
|
||||
:type _content_type: str, Optional
|
||||
:param _headers: set to override the headers for a single
|
||||
request; this effectively ignores the headers
|
||||
in the spec for a single request.
|
||||
:type _headers: dict, optional
|
||||
:param _host_index: set to override the host_index for a single
|
||||
request; this effectively ignores the host_index
|
||||
in the spec for a single request.
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._post_audio_transcriptions_public_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "OpenaiAudioResponse",
|
||||
'401': None,
|
||||
'403': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _post_audio_transcriptions_public_serialize(
|
||||
self,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
_host_index,
|
||||
) -> RequestSerialized:
|
||||
|
||||
_host = None
|
||||
|
||||
_collection_formats: Dict[str, str] = {
|
||||
}
|
||||
|
||||
_path_params: Dict[str, str] = {}
|
||||
_query_params: List[Tuple[str, str]] = []
|
||||
_header_params: Dict[str, Optional[str]] = _headers or {}
|
||||
_form_params: List[Tuple[str, str]] = []
|
||||
_files: Dict[
|
||||
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
||||
] = {}
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
# process the query parameters
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
if 'Accept' not in _header_params:
|
||||
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||
[
|
||||
'application/json'
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
# authentication setting
|
||||
_auth_settings: List[str] = [
|
||||
'bearer'
|
||||
]
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='POST',
|
||||
resource_path='/v1/audio/transcriptions/public',
|
||||
path_params=_path_params,
|
||||
query_params=_query_params,
|
||||
header_params=_header_params,
|
||||
body=_body_params,
|
||||
post_params=_form_params,
|
||||
files=_files,
|
||||
auth_settings=_auth_settings,
|
||||
collection_formats=_collection_formats,
|
||||
_host=_host,
|
||||
_request_auth=_request_auth
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def post_audio_voice(
|
||||
self,
|
||||
|
||||
@@ -157,6 +157,7 @@ class IamUser(BaseModel):
|
||||
microsoftonline: Optional[StrictStr] = None
|
||||
multi_factor_auths: Optional[List[IamMfaProps]] = Field(default=None, alias="multiFactorAuths")
|
||||
name: Optional[StrictStr] = None
|
||||
name_key: Optional[StrictStr] = Field(default=None, alias="nameKey")
|
||||
naver: Optional[StrictStr] = None
|
||||
need_update_password: Optional[StrictBool] = Field(default=None, alias="needUpdatePassword")
|
||||
nextcloud: Optional[StrictStr] = None
|
||||
@@ -219,7 +220,7 @@ class IamUser(BaseModel):
|
||||
yammer: Optional[StrictStr] = None
|
||||
yandex: Optional[StrictStr] = None
|
||||
zoom: Optional[StrictStr] = None
|
||||
__properties: ClassVar[List[str]] = ["accessKey", "accessSecret", "accessSecretHash", "accessToken", "address", "addresses", "adfs", "affiliation", "alipay", "amazon", "apple", "applicationScopes", "auth0", "avatar", "avatarType", "azuread", "azureadb2c", "baidu", "balance", "balanceCredit", "balanceCurrency", "battlenet", "bilibili", "bio", "birthday", "bitbucket", "box", "cart", "cloudfoundry", "countryCode", "createdAt", "createdIp", "createdTime", "currency", "custom", "custom10", "custom2", "custom3", "custom4", "custom5", "custom6", "custom7", "custom8", "custom9", "dailymotion", "deezer", "deleted", "deletedTime", "digitalocean", "dingtalk", "discord", "displayName", "douyin", "dropbox", "education", "email", "emailVerified", "eveonline", "externalId", "faceIds", "facebook", "firstName", "fitbit", "gender", "gitea", "gitee", "github", "gitlab", "google", "hash", "heroku", "homepage", "iam", "id", "idCard", "idCardType", "influxcloud", "infoflow", "instagram", "intercom", "invitation", "invitationCode", "ipWhitelist", "isAdmin", "isDefaultAvatar", "isDeleted", "isForbidden", "isOnline", "isVerified", "kakao", "karma", "kwai", "language", "lark", "lastChangePasswordTime", "lastName", "lastSigninIp", "lastSigninTime", "lastSigninWrongTime", "lastfm", "ldap", "line", "linkedin", "location", "mailru", "managedAccounts", "meetup", "mfaAccounts", "mfaEmailEnabled", "mfaItems", "mfaPhoneEnabled", "mfaPushEnabled", "mfaPushProvider", "mfaPushReceiver", "mfaRadiusEnabled", "mfaRadiusProvider", "mfaRadiusUsername", "mfaRememberDeadline", "mfaRememberDigest", "microsoftonline", "multiFactorAuths", "name", "naver", "needUpdatePassword", "nextcloud", "okta", "onedrive", "originalRefreshToken", "originalToken", "oura", "owner", "passwordHash", "passwordSalt", "passwordType", "patreon", "paypal", "permanentAvatar", "phone", "preHash", "preferredMfaType", "properties", "qq", "ranking", "realName", "recoveryCodes", "region", "registerSource", "registerType", "salesforce", "score", "shopify", "signinWrongTimes", "signupApplication", "slack", "soundcloud", "spotify", "steam", "strava", "stripe", "tag", "telegram", "tiktok", "title", "totpSecret", "tumblr", "twitch", "twitter", "type", "typetalk", "uber", "updatedAt", "updatedTime", "verificationCode", "vk", "webauthnCredentials", "wechat", "wecom", "weibo", "wepay", "xero", "yahoo", "yammer", "yandex", "zoom"]
|
||||
__properties: ClassVar[List[str]] = ["accessKey", "accessSecret", "accessSecretHash", "accessToken", "address", "addresses", "adfs", "affiliation", "alipay", "amazon", "apple", "applicationScopes", "auth0", "avatar", "avatarType", "azuread", "azureadb2c", "baidu", "balance", "balanceCredit", "balanceCurrency", "battlenet", "bilibili", "bio", "birthday", "bitbucket", "box", "cart", "cloudfoundry", "countryCode", "createdAt", "createdIp", "createdTime", "currency", "custom", "custom10", "custom2", "custom3", "custom4", "custom5", "custom6", "custom7", "custom8", "custom9", "dailymotion", "deezer", "deleted", "deletedTime", "digitalocean", "dingtalk", "discord", "displayName", "douyin", "dropbox", "education", "email", "emailVerified", "eveonline", "externalId", "faceIds", "facebook", "firstName", "fitbit", "gender", "gitea", "gitee", "github", "gitlab", "google", "hash", "heroku", "homepage", "iam", "id", "idCard", "idCardType", "influxcloud", "infoflow", "instagram", "intercom", "invitation", "invitationCode", "ipWhitelist", "isAdmin", "isDefaultAvatar", "isDeleted", "isForbidden", "isOnline", "isVerified", "kakao", "karma", "kwai", "language", "lark", "lastChangePasswordTime", "lastName", "lastSigninIp", "lastSigninTime", "lastSigninWrongTime", "lastfm", "ldap", "line", "linkedin", "location", "mailru", "managedAccounts", "meetup", "mfaAccounts", "mfaEmailEnabled", "mfaItems", "mfaPhoneEnabled", "mfaPushEnabled", "mfaPushProvider", "mfaPushReceiver", "mfaRadiusEnabled", "mfaRadiusProvider", "mfaRadiusUsername", "mfaRememberDeadline", "mfaRememberDigest", "microsoftonline", "multiFactorAuths", "name", "nameKey", "naver", "needUpdatePassword", "nextcloud", "okta", "onedrive", "originalRefreshToken", "originalToken", "oura", "owner", "passwordHash", "passwordSalt", "passwordType", "patreon", "paypal", "permanentAvatar", "phone", "preHash", "preferredMfaType", "properties", "qq", "ranking", "realName", "recoveryCodes", "region", "registerSource", "registerType", "salesforce", "score", "shopify", "signinWrongTimes", "signupApplication", "slack", "soundcloud", "spotify", "steam", "strava", "stripe", "tag", "telegram", "tiktok", "title", "totpSecret", "tumblr", "twitch", "twitter", "type", "typetalk", "uber", "updatedAt", "updatedTime", "verificationCode", "vk", "webauthnCredentials", "wechat", "wecom", "weibo", "wepay", "xero", "yahoo", "yammer", "yandex", "zoom"]
|
||||
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
@@ -251,8 +252,10 @@ class IamUser(BaseModel):
|
||||
* `None` is only added to the output dict for nullable fields that
|
||||
were set at model initialization. Other fields with value `None`
|
||||
are ignored.
|
||||
* OpenAPI `readOnly` fields are excluded.
|
||||
"""
|
||||
excluded_fields: Set[str] = set([
|
||||
"name_key",
|
||||
])
|
||||
|
||||
_dict = self.model_dump(
|
||||
@@ -450,6 +453,7 @@ class IamUser(BaseModel):
|
||||
"microsoftonline": obj.get("microsoftonline"),
|
||||
"multiFactorAuths": [IamMfaProps.from_dict(_item) for _item in obj["multiFactorAuths"]] if obj.get("multiFactorAuths") is not None else None,
|
||||
"name": obj.get("name"),
|
||||
"nameKey": obj.get("nameKey"),
|
||||
"naver": obj.get("naver"),
|
||||
"needUpdatePassword": obj.get("needUpdatePassword"),
|
||||
"nextcloud": obj.get("nextcloud"),
|
||||
|
||||
@@ -31,7 +31,7 @@ class KnowledgeFile(BaseModel):
|
||||
clipped: Optional[StrictBool] = Field(default=None, description="Clipped is true when the file held more text than one file is indexed for, and only its beginning was indexed.")
|
||||
created: Optional[StrictInt] = Field(default=None, description="Created is when the file was first registered, in unix seconds.")
|
||||
embedded: Optional[StrictInt] = Field(default=None, description="Embedded is how many of those passages carry a vector — Passages once the embed stage is done.")
|
||||
error: Optional[StrictStr] = Field(default=None, description="Error is why a stored or failed file was not indexed, in words a person can act on. Absent otherwise.")
|
||||
error: Optional[StrictStr] = Field(default=None, description="Error is why a stored or failed file was not indexed — or, on a ready file, why it is searched by its words alone — in words a person can act on. Absent otherwise.")
|
||||
id: Optional[StrictStr] = Field(default=None, description="ID names the file in its org. It is derived from the bucket and key, so registering the same object twice answers the same file.")
|
||||
key: Optional[StrictStr] = Field(default=None, description="Key is the object's key in that bucket. GET /v1/s3/buckets/{bucket}/objects/{key} answers a signed download URL for it.")
|
||||
name: Optional[StrictStr] = Field(default=None, description="Name is the object's file name, the last segment of its key.")
|
||||
@@ -40,8 +40,8 @@ class KnowledgeFile(BaseModel):
|
||||
project: Optional[StrictStr] = Field(default=None, description="Project is the project scope it is indexed under. Absent for the org's own files.")
|
||||
sections: Optional[StrictInt] = Field(default=None, description="Sections is how many nodes its table of contents has, the document's own root included.")
|
||||
size: Optional[StrictInt] = Field(default=None, description="Size is the object's length in bytes, as the store reports it.")
|
||||
stage: Optional[StrictStr] = Field(default=None, description="Stage is the ingest stage the file is in or last finished: extract, toc, passages, embed or graph.")
|
||||
status: Optional[StrictStr] = Field(default=None, description="Status is queued, indexing, ready, stored (kept but not indexed — Error says why) or failed. A file's passages are searchable from the passages stage on, and its semantic leg grows while it embeds.")
|
||||
stage: Optional[StrictStr] = Field(default=None, description="Stage is the ingest stage the file is in: extract, toc, passages or graph while indexing, embed while a ready file's vectors are written. Absent once the ingest is done.")
|
||||
status: Optional[StrictStr] = Field(default=None, description="Status is queued, indexing, ready, stored (kept but not indexed — Error says why) or failed. A ready file's contents, passages and links are all readable and its full text is searched; its vectors may still be filling in (Stage embed), which adds search by meaning as it goes.")
|
||||
type: Optional[StrictStr] = Field(default=None, description="Type is the object's media type as the store holds it, or the one its name implies when the store holds only the generic default.")
|
||||
updated: Optional[StrictInt] = Field(default=None, description="Updated is when its record last changed, in unix seconds.")
|
||||
__properties: ClassVar[List[str]] = ["bucket", "chars", "clipped", "created", "embedded", "error", "id", "key", "name", "parent", "passages", "project", "sections", "size", "stage", "status", "type", "updated"]
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "hanzoai"
|
||||
version = "8.5.549"
|
||||
version = "8.5.550"
|
||||
description = "The official Python library for the Hanzo API"
|
||||
dynamic = ["readme"]
|
||||
license = "Apache-2.0"
|
||||
|
||||
Reference in New Issue
Block a user