feat: search support images return (#35)

Co-authored-by: jinhaiyang <haiyang.jin@aminer.cn>
This commit is contained in:
Tom 2025-09-22 10:51:52 +08:00 committed by GitHub
parent 372d99cc4d
commit 601cbd12d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 4 deletions

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "zai-sdk"
version = "0.0.3.5"
version = "0.0.3.6"
description = "A SDK library for accessing big model apis from Z.ai"
authors = ["Z.ai"]
readme = "README.md"

View file

@ -1,2 +1,2 @@
__title__ = 'Z.ai'
__version__ = '0.0.3.5'
__version__ = '0.0.3.6'

View file

@ -42,7 +42,8 @@ class WebSearchApi(BaseAPI):
search_recency_filter: Optional[str] | NotGiven = NOT_GIVEN,
content_size: Optional[str] | NotGiven = NOT_GIVEN,
search_intent: Optional[bool] | NotGiven = NOT_GIVEN,
extra_headers: Headers | None = None,
include_image: Optional[bool] | NotGiven = NOT_GIVEN,
extra_headers: Headers | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> WebSearchResp:
@ -58,6 +59,7 @@ class WebSearchApi(BaseAPI):
'search_recency_filter': search_recency_filter,
'content_size': content_size,
'search_intent': search_intent,
'include_image': include_image
}
)
return self._post(

View file

@ -1,4 +1,4 @@
from typing import Optional
from typing import Optional,List
from zai.core import BaseModel
@ -39,6 +39,7 @@ class SearchResultResp(BaseModel):
media: str
refer: str
publish_date: str
images: List[str]
class WebSearchResp(BaseModel):