Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions jigsawstack/search.py
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, List, Literal, Optional, Union, cast
from typing import Any, Dict, List, Literal, Union, cast

from typing_extensions import NotRequired, TypedDict

Expand DownExpand Up@@ -57,7 +57,7 @@ class SearchResponse(BaseResponse):
The search query that was used
"""

ai_overview: Optional[str]
ai_overview: NotRequired[str]
"""
AI-generated overview/summary of the search results
or deep research results if enabled
Expand DownExpand Up@@ -242,7 +242,7 @@ def __init__(

def search(self, params: SearchParams) -> SearchResponse:
query = params["query"]
ai_overview = params.get("ai_overview", "True")
ai_overview = params.get("ai_overview", "False")
safe_search = params.get("safe_search", "moderate")
spell_check = params.get("spell_check", "True")

Expand DownExpand Up@@ -314,7 +314,7 @@ def __init__(
async def search(self, params: SearchParams) -> SearchResponse:
path = "/web/search"
query = params["query"]
ai_overview = params.get("ai_overview", "True")
ai_overview = params.get("ai_overview", "False")
safe_search = params.get("safe_search", "moderate")
spell_check = params.get("spell_check", "True")

Expand DownExpand Up@@ -343,7 +343,9 @@ async def search(self, params: SearchParams) -> SearchResponse:
).perform_with_content()
return resp

async def suggestions(self, params: SearchSuggestionsParams) -> SearchSuggestionsResponse:
async def suggestions(
self, params: SearchSuggestionsParams
) -> SearchSuggestionsResponse:
query = params["query"]
path = f"/web/search/suggest?query={query}"
resp = await AsyncRequest(
Expand Down
2 changes: 1 addition & 1 deletion jigsawstack/version.py
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
__version__ = "0.4.2"
__version__ = "0.4.3"


def get_version() -> str:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@

setup(
name="jigsawstack",
version="0.4.2",
version="0.4.3",
description="JigsawStack - The AI SDK for Python",
long_description=open("README.md", encoding="utf8").read(),
long_description_content_type="text/markdown",
Expand Down
Loading