Skip to content

Commit e75c236

Browse files
add geo_location in async
1 parent af3433c commit e75c236

File tree

6 files changed

+10
-2
lines changed

6 files changed

+10
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "oxylabs-ai-studio"
3-
version = "0.2.11"
3+
version = "0.2.12"
44
description = "Oxylabs studio python sdk"
55
readme = "README.md"
66
keywords = ["oxylabs", "ai", "studio"]

src/oxylabs_ai_studio/apps/ai_crawler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ async def crawl_async(
103103
schema: dict[str, Any] | None = None,
104104
render_javascript: bool = False,
105105
return_sources_limit: int = 25,
106+
geo_location: str | None = None,
106107
) -> AiCrawlerJob:
107108
"""Async version of crawl."""
108109
if output_format == "json" and schema is None:
@@ -116,6 +117,7 @@ async def crawl_async(
116117
"auxiliary_prompt": user_prompt,
117118
"render_html": render_javascript,
118119
"return_sources_limit": return_sources_limit,
120+
"geo_location": geo_location,
119121
}
120122
async with self.async_client() as client:
121123
create_response = await client.post(url="/extract/run", json=body)

src/oxylabs_ai_studio/apps/ai_scraper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ async def scrape_async(
9696
output_format: Literal["json", "markdown"] = "markdown",
9797
schema: dict[str, Any] | None = None,
9898
render_javascript: bool = False,
99+
geo_location: str | None = None,
99100
) -> AiScraperJob:
100101
"""Async version of scrape."""
101102
if output_format == "json" and schema is None:
@@ -106,6 +107,7 @@ async def scrape_async(
106107
"output_format": output_format,
107108
"openapi_schema": schema,
108109
"render_html": render_javascript,
110+
"geo_location": geo_location,
109111
}
110112
async with self.async_client() as client:
111113
create_response = await client.post(url="/scrape", json=body)

src/oxylabs_ai_studio/apps/ai_search.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ async def search_async(
8888
limit: int = 10,
8989
render_javascript: bool = False,
9090
return_content: bool = True,
91+
geo_location: str | None = None,
9192
) -> AiSearchJob:
9293
"""Async version of search."""
9394
if not query:
@@ -98,6 +99,7 @@ async def search_async(
9899
"limit": limit,
99100
"render_html": render_javascript,
100101
"return_content": return_content,
102+
"geo_location": geo_location,
101103
}
102104
async with self.async_client() as client:
103105
create_response = await client.post(url="/search/run", json=body)

src/oxylabs_ai_studio/apps/browser_agent.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ async def run_async(
9797
user_prompt: str = "",
9898
output_format: Literal["json", "markdown", "html", "screenshot"] = "markdown",
9999
schema: dict[str, Any] | None = None,
100+
geo_location: str | None = None,
100101
) -> BrowserAgentJob:
101102
"""Async version of run."""
102103
if output_format == "json" and schema is None:
@@ -107,6 +108,7 @@ async def run_async(
107108
"output_format": output_format,
108109
"openapi_schema": schema,
109110
"auxiliary_prompt": user_prompt,
111+
"geo_location": geo_location,
110112
}
111113
async with self.async_client() as client:
112114
create_response = await client.post(url="/browser-agent/run", json=body)

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)