Skip to content

Commit c9c388e

Browse files
feat(api): api update
1 parent 148be86 commit c9c388e

4 files changed

Lines changed: 30 additions & 40 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 22
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-1cbd2dedb73f97573854f4ec863ebc17920b5813b6b16259f26989935b0cb1f4.yml
3-
openapi_spec_hash: 1da5f104706e10973ebe29341f6cc0b7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-0f4b818ec07eb384832ac53f99b79eb59b0af5246209c6954c416148c8f0b5c0.yml
3+
openapi_spec_hash: 08043c0ff1dea4cb8f0c5e54368a84c4
44
config_hash: 70354330f92ce169beabc98696ebb9a3

‎src/context/dev/resources/ai.py‎

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,8 @@ def extract_product(
115115
timeout: float | httpx.Timeout | None | NotGiven = not_given,
116116
) -> AIExtractProductResponse:
117117
"""
118-
Beta feature: Given a single URL, determines if it is a product detail page,
119-
classifies the platform/product type, and extracts the product information.
120-
Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites.
118+
Given a single URL, determines if it is a product page and extracts the product
119+
information.
121120
122121
Args:
123122
url: The product page URL to extract product data from.
@@ -162,11 +161,11 @@ def extract_products(
162161
extra_body: Body | None = None,
163162
timeout: float | httpx.Timeout | None | NotGiven = not_given,
164163
) -> AIExtractProductsResponse:
165-
"""Beta feature: Extract product information from a brand's website.
164+
"""Extract product information from a brand's website.
166165
167-
We will
168-
analyze the website and return a list of products with details such as name,
169-
description, image, pricing, features, and more.
166+
We will analyze the website
167+
and return a list of products with details such as name, description, image,
168+
pricing, features, and more.
170169
171170
Args:
172171
domain: The domain name to analyze.
@@ -200,11 +199,11 @@ def extract_products(
200199
extra_body: Body | None = None,
201200
timeout: float | httpx.Timeout | None | NotGiven = not_given,
202201
) -> AIExtractProductsResponse:
203-
"""Beta feature: Extract product information from a brand's website.
202+
"""Extract product information from a brand's website.
204203
205-
We will
206-
analyze the website and return a list of products with details such as name,
207-
description, image, pricing, features, and more.
204+
We will analyze the website
205+
and return a list of products with details such as name, description, image,
206+
pricing, features, and more.
208207
209208
Args:
210209
direct_url: A specific URL to use directly as the starting point for extraction without
@@ -347,9 +346,8 @@ async def extract_product(
347346
timeout: float | httpx.Timeout | None | NotGiven = not_given,
348347
) -> AIExtractProductResponse:
349348
"""
350-
Beta feature: Given a single URL, determines if it is a product detail page,
351-
classifies the platform/product type, and extracts the product information.
352-
Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites.
349+
Given a single URL, determines if it is a product page and extracts the product
350+
information.
353351
354352
Args:
355353
url: The product page URL to extract product data from.
@@ -394,11 +392,11 @@ async def extract_products(
394392
extra_body: Body | None = None,
395393
timeout: float | httpx.Timeout | None | NotGiven = not_given,
396394
) -> AIExtractProductsResponse:
397-
"""Beta feature: Extract product information from a brand's website.
395+
"""Extract product information from a brand's website.
398396
399-
We will
400-
analyze the website and return a list of products with details such as name,
401-
description, image, pricing, features, and more.
397+
We will analyze the website
398+
and return a list of products with details such as name, description, image,
399+
pricing, features, and more.
402400
403401
Args:
404402
domain: The domain name to analyze.
@@ -432,11 +430,11 @@ async def extract_products(
432430
extra_body: Body | None = None,
433431
timeout: float | httpx.Timeout | None | NotGiven = not_given,
434432
) -> AIExtractProductsResponse:
435-
"""Beta feature: Extract product information from a brand's website.
433+
"""Extract product information from a brand's website.
436434
437-
We will
438-
analyze the website and return a list of products with details such as name,
439-
description, image, pricing, features, and more.
435+
We will analyze the website
436+
and return a list of products with details such as name, description, image,
437+
pricing, features, and more.
440438
441439
Args:
442440
direct_url: A specific URL to use directly as the starting point for extraction without

‎src/context/dev/resources/industry.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ def retrieve_sic(
120120
) -> IndustryRetrieveSicResponse:
121121
"""
122122
Classify any brand into Standard Industrial Classification (SIC) codes from its
123-
domain or name. Choose between the original 1987 SIC system (`original_sic`) or
124-
the latest SIC list maintained by the SEC (`latest_sec`).
123+
domain or name. Choose between the original SIC system (`original_sic`) or the
124+
latest SIC list maintained by the SEC (`latest_sec`).
125125
126126
Args:
127127
input: Brand domain or title to retrieve SIC code for. If a valid domain is provided,
@@ -266,8 +266,8 @@ async def retrieve_sic(
266266
) -> IndustryRetrieveSicResponse:
267267
"""
268268
Classify any brand into Standard Industrial Classification (SIC) codes from its
269-
domain or name. Choose between the original 1987 SIC system (`original_sic`) or
270-
the latest SIC list maintained by the SEC (`latest_sec`).
269+
domain or name. Choose between the original SIC system (`original_sic`) or the
270+
latest SIC list maintained by the SEC (`latest_sec`).
271271
272272
Args:
273273
input: Brand domain or title to retrieve SIC code for. If a valid domain is provided,

‎src/context/dev/resources/utility.py‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ def prefetch(
5656
) -> UtilityPrefetchResponse:
5757
"""
5858
Signal that you may fetch brand data for a particular domain soon to improve
59-
latency. This endpoint does not charge credits and is available for paid
60-
customers to optimize future requests. [You must be on a paid plan to use this
61-
endpoint]
59+
latency.
6260
6361
Args:
6462
domain: Domain name to prefetch brand data for
@@ -106,9 +104,7 @@ def prefetch_by_email(
106104
Signal that you may fetch brand data for a particular domain soon to improve
107105
latency. This endpoint accepts an email address, extracts the domain from it,
108106
validates that it's not a disposable or free email provider, and queues the
109-
domain for prefetching. This endpoint does not charge credits and is available
110-
for paid customers to optimize future requests. [You must be on a paid plan to
111-
use this endpoint]
107+
domain for prefetching.
112108
113109
Args:
114110
email: Email address to prefetch brand data for. The domain will be extracted from the
@@ -177,9 +173,7 @@ async def prefetch(
177173
) -> UtilityPrefetchResponse:
178174
"""
179175
Signal that you may fetch brand data for a particular domain soon to improve
180-
latency. This endpoint does not charge credits and is available for paid
181-
customers to optimize future requests. [You must be on a paid plan to use this
182-
endpoint]
176+
latency.
183177
184178
Args:
185179
domain: Domain name to prefetch brand data for
@@ -227,9 +221,7 @@ async def prefetch_by_email(
227221
Signal that you may fetch brand data for a particular domain soon to improve
228222
latency. This endpoint accepts an email address, extracts the domain from it,
229223
validates that it's not a disposable or free email provider, and queues the
230-
domain for prefetching. This endpoint does not charge credits and is available
231-
for paid customers to optimize future requests. [You must be on a paid plan to
232-
use this endpoint]
224+
domain for prefetching.
233225
234226
Args:
235227
email: Email address to prefetch brand data for. The domain will be extracted from the

0 commit comments

Comments
 (0)