Skip to content

Commit 8865bc4

Browse files
author
jinhaiyang
committed
search supoort images return
1 parent 372d99c commit 8865bc4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/zai/api_resource/web_search/web_search.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def web_search(
4242
search_recency_filter: Optional[str] | NotGiven = NOT_GIVEN,
4343
content_size: Optional[str] | NotGiven = NOT_GIVEN,
4444
search_intent: Optional[bool] | NotGiven = NOT_GIVEN,
45-
extra_headers: Headers | None = None,
45+
include_image: Optional[bool] | NotGiven = NOT_GIVEN,
46+
extra_headers: Headers | None = None,
4647
extra_body: Body | None = None,
4748
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
4849
) -> WebSearchResp:
@@ -58,6 +59,7 @@ def web_search(
5859
'search_recency_filter': search_recency_filter,
5960
'content_size': content_size,
6061
'search_intent': search_intent,
62+
'include_image': include_image
6163
}
6264
)
6365
return self._post(

src/zai/types/web_search/web_search_resp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Optional
1+
from typing import Optional,List
22

33
from zai.core import BaseModel
44

@@ -39,6 +39,7 @@ class SearchResultResp(BaseModel):
3939
media: str
4040
refer: str
4141
publish_date: str
42+
images: List[str]
4243

4344

4445
class WebSearchResp(BaseModel):

0 commit comments

Comments
 (0)