Skip to content

Commit 29a6e8f

Browse files
SDK regeneration (#141)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 5656146 commit 29a6e8f

22 files changed

+189
-603
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "twelvelabs"
33

44
[tool.poetry]
55
name = "twelvelabs"
6-
version = "1.0.0"
6+
version = "1.0.1"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

Lines changed: 34 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ This endpoint generates open-ended texts based on your videos, including but not
226226

227227
<Note title="Notes">
228228
- This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
229-
- This endpoint supports streaming responses. For details on integrating this feature into your application, refer to the [Streaming response](/v1.3/docs/guides/generate-text-from-video/open-ended-text#streaming-responses) guide.
229+
- This endpoint supports streaming responses. For details on integrating this feature into your application, refer to the [Open-ended analysis](/v1.3/docs/guides/analyze-videos/open-ended-analysis#streaming-responses) guide.
230230
</Note>
231231
</dd>
232232
</dl>
@@ -351,7 +351,7 @@ This endpoint analyzes your videos and creates fully customizable text based on
351351

352352
<Note title="Notes">
353353
- This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
354-
- This endpoint supports streaming responses. For details on integrating this feature into your application, refer to the [Streaming response](/v1.3/docs/guides/generate-text-from-video/open-ended-text#streaming-responses) guide.
354+
- This endpoint supports streaming responses. For details on integrating this feature into your application, refer to the [Open-ended analysis](/v1.3/docs/guides/analyze-videos/open-ended-analysis#streaming-responses) guide.
355355
</Note>
356356
</dd>
357357
</dl>
@@ -465,7 +465,7 @@ This endpoint analyzes your videos and creates fully customizable text based on
465465

466466
<Note title="Notes">
467467
- This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.
468-
- This endpoint supports streaming responses. For details on integrating this feature into your application, refer to the [Streaming response](/v1.3/docs/guides/generate-text-from-video/open-ended-text#streaming-responses) guide.
468+
- This endpoint supports streaming responses. For details on integrating this feature into your application, refer to the [Open-ended analysis](/v1.3/docs/guides/analyze-videos/open-ended-analysis#streaming-responses) guide.
469469
</Note>
470470
</dd>
471471
</dl>
@@ -800,7 +800,7 @@ Upload options:
800800
- **Duration**: For Marengo, it must be between 4 seconds and 2 hours (7,200s). For Pegasus, it must be between 4 seconds and 60 minutes (3600s). In a future release, the maximum duration for Pegasus will be 2 hours (7,200 seconds).
801801
- **File size**: Must not exceed 2 GB.
802802
If you require different options, contact us at support@twelvelabs.io.
803-
803+
804804
If both Marengo and Pegasus are enabled for your index, the most restrictive prerequisites will apply.
805805
</Accordion>
806806

@@ -1534,100 +1534,6 @@ client.indexes.delete(
15341534
</dl>
15351535

15361536

1537-
</dd>
1538-
</dl>
1539-
</details>
1540-
1541-
## Manage videos
1542-
<details><summary><code>client.manage_videos.<a href="src/twelvelabs/manage_videos/client.py">partial_update_video_information</a>(...)</code></summary>
1543-
<dl>
1544-
<dd>
1545-
1546-
#### 📝 Description
1547-
1548-
<dl>
1549-
<dd>
1550-
1551-
<dl>
1552-
<dd>
1553-
1554-
Use this method to update one or more fields of the metadata of a video. Also, you can delete a field by setting it to `null`.
1555-
</dd>
1556-
</dl>
1557-
</dd>
1558-
</dl>
1559-
1560-
#### 🔌 Usage
1561-
1562-
<dl>
1563-
<dd>
1564-
1565-
<dl>
1566-
<dd>
1567-
1568-
```python
1569-
from twelvelabs import TwelveLabs
1570-
1571-
client = TwelveLabs(
1572-
api_key="YOUR_API_KEY",
1573-
)
1574-
client.manage_videos.partial_update_video_information(
1575-
index_id="6298d673f1090f1100476d4c",
1576-
video_id="6298d673f1090f1100476d4c",
1577-
user_metadata={
1578-
"category": "recentlyAdded",
1579-
"batchNumber": 5,
1580-
"rating": 9.3,
1581-
"needsReview": True,
1582-
},
1583-
)
1584-
1585-
```
1586-
</dd>
1587-
</dl>
1588-
</dd>
1589-
</dl>
1590-
1591-
#### ⚙️ Parameters
1592-
1593-
<dl>
1594-
<dd>
1595-
1596-
<dl>
1597-
<dd>
1598-
1599-
**index_id:** `str` — The unique identifier of the index to which the video has been uploaded.
1600-
1601-
</dd>
1602-
</dl>
1603-
1604-
<dl>
1605-
<dd>
1606-
1607-
**video_id:** `str` — The unique identifier of the video to update.
1608-
1609-
</dd>
1610-
</dl>
1611-
1612-
<dl>
1613-
<dd>
1614-
1615-
**user_metadata:** `typing.Optional[UserMetadata]`
1616-
1617-
</dd>
1618-
</dl>
1619-
1620-
<dl>
1621-
<dd>
1622-
1623-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
1624-
1625-
</dd>
1626-
</dl>
1627-
</dd>
1628-
</dl>
1629-
1630-
16311537
</dd>
16321538
</dl>
16331539
</details>
@@ -1666,7 +1572,7 @@ Parameters for embeddings:
16661572
- `audio_file`: Local audio file.
16671573

16681574
<Note title="Notes">
1669-
- The "Marengo-retrieval-2.7" video understanding model generates embeddings for all modalities in the same latent space. This shared space enables any-to-any searches across different types of content.
1575+
- The Marengo video understanding model generates embeddings for all modalities in the same latent space. This shared space enables any-to-any searches across different types of content.
16701576
- You can create multiple types of embeddings in a single API call.
16711577
- Audio embeddings combine generic sound and human speech in a single embedding. For videos with transcriptions, you can retrieve transcriptions and then [create text embeddings](/v1.3/api-reference/text-image-audio-embeddings/create-text-image-audio-embeddings) from these transcriptions.
16721578
</Note>
@@ -1768,7 +1674,7 @@ typing.Optional[core.File]` — See core.File for more documentation
17681674
<dl>
17691675
<dd>
17701676

1771-
**audio_url:** `typing.Optional[str]` — The publicly accessible URL of the audio file for which you wish to creae an embedding. This parameter is required for audio embeddings if `audio_file` is not provided.
1677+
**audio_url:** `typing.Optional[str]` — The publicly accessible URL of the audio file for which you wish to create an embedding. This parameter is required for audio embeddings if `audio_file` is not provided.
17721678

17731679
</dd>
17741680
</dl>
@@ -2010,9 +1916,6 @@ When you perform a search specifying multiple [sources of information](/v1.3/doc
20101916

20111917
- `and`
20121918

2013-
For details and examples, see the [Using multiple sources of information](/v1.3/docs/guides/search/queries/text-queries#visual-and-audio) section.
2014-
2015-
20161919
**Default**: `or`.
20171920

20181921
</dd>
@@ -2039,11 +1942,11 @@ Specifies a stringified JSON object to filter your search results. Supports both
20391942

20401943
**Syntax for filtering**
20411944

2042-
The following table describes the supported data types, operators, and filter syntax:
1945+
The following table describes the supported data types, operators, and filter syntax:
20431946

20441947
| Data type | Operator | Description | Syntax |
20451948
|:----------|:---------|:------------|:-------|
2046-
| String | `=` | Matches results equal to the specified value. | `{"field": "value"}`
1949+
| String | `=` | Matches results equal to the specified value. | `{"field": "value"}`
20471950
| Array of strings | `=` | Matches results with any value in the specified array. Supported only for `id`. | `{"id": ["value1", "value2"]}` |
20481951
| Numeric (integer, float) | `=`, `lte`, `gte` | Matches results equal to or within a range of the specified value. | `{"field": number}` or `{"field": { "gte": number, "lte": number }}` |
20491952
| Boolean | `=` | Matches results equal to the specified boolean value. | `{"field": true}` or `{"field": false}`. |
@@ -2059,8 +1962,8 @@ The table below describes the system-generated metadata available for filtering
20591962
| `duration` | Filters based on the duration of the video containing the segment that matches your query. | Number or object with `gte` and `lte` | `{"duration": 600}` or `{"duration": { "gte": 600, "lte": 800 }}` |
20601963
| `width` | Filters by video width (in pixels). | Number or object with `gte` and `lte` | `{"width": 1920}` or `{"width": { "gte": 1280, "lte": 1920}}` |
20611964
| `height` | Filters by video height (in pixels). | Number or object with `gte` and `lte`. | `{"height": 1080}` or `{"height": { "gte": 720, "lte": 1080 }}`. |
2062-
| `size` | Filters by video size (in bytes) | Number or object with `gte` and `lte`. | `{"size": 1048576}` or `{"size": { "gte": 1048576, "lte": 5242880}}` |
2063-
| `filename` | Filters by the exact file name. | String | `{"filename": "Animal Encounters part 1"}` |
1965+
| `size` | Filters by video size (in bytes) | Number or object with `gte` and `lte`. | `{"size": 1048576}` or `{"size": { "gte": 1048576, "lte": 5242880}}` |
1966+
| `filename` | Filters by the exact file name. | String | `{"filename": "Animal Encounters part 1"}` |
20641967

20651968
<br/>
20661969
**User-defined metadata**
@@ -2337,7 +2240,7 @@ Specify at least one option. If both are provided, `video_url` takes precedence.
23372240
</Accordion>
23382241

23392242
<Note title="Notes">
2340-
- The "Marengo-retrieval-2.7" video understanding model generates embeddings for all modalities in the same latent space. This shared space enables any-to-any searches across different types of content.
2243+
- The Marengo video understanding model generates embeddings for all modalities in the same latent space. This shared space enables any-to-any searches across different types of content.
23412244
- Video embeddings are stored for seven days.
23422245
- The platform supports uploading video files that can play without additional user interaction or custom video players. Ensure your URL points to the raw video file, not a web page containing the video. Links to third-party hosting sites, cloud storage services, or videos requiring extra steps to play are not supported.
23432246
</Note>
@@ -2950,7 +2853,7 @@ To retrieve embeddings for a video, it must be indexed using the Marengo video u
29502853

29512854
The platform does not return embeddings if you don't provide this parameter.
29522855

2953-
The values you specify in `embedding_option` must be included in the `model_options` defined when the index was created. For example, if `model_options` is set to `visual,` you cannot set `embedding_option` to `audio` or both `visual-text` and `audio`.
2856+
The values you specify in `embedding_option` must be included in the `model_options` defined when the index was created. For example, if `model_options` is set to `visual` only, then you cannot set `embedding_option` to `audio` or both `visual-text` and `audio`.
29542857

29552858
</dd>
29562859
</dl>
@@ -2978,7 +2881,7 @@ The values you specify in `embedding_option` must be included in the `model_opti
29782881
</dl>
29792882
</details>
29802883

2981-
<details><summary><code>client.indexes.videos.<a href="src/twelvelabs/indexes/videos/client.py">update</a>(...)</code></summary>
2884+
<details><summary><code>client.indexes.videos.<a href="src/twelvelabs/indexes/videos/client.py">delete</a>(...)</code></summary>
29822885
<dl>
29832886
<dd>
29842887

@@ -2990,7 +2893,7 @@ The values you specify in `embedding_option` must be included in the `model_opti
29902893
<dl>
29912894
<dd>
29922895

2993-
Use this method to update the metadata of a video.
2896+
This method deletes all the information about the specified video. This action cannot be undone.
29942897
</dd>
29952898
</dl>
29962899
</dd>
@@ -3010,15 +2913,9 @@ from twelvelabs import TwelveLabs
30102913
client = TwelveLabs(
30112914
api_key="YOUR_API_KEY",
30122915
)
3013-
client.indexes.videos.update(
2916+
client.indexes.videos.delete(
30142917
index_id="6298d673f1090f1100476d4c",
30152918
video_id="6298d673f1090f1100476d4c",
3016-
user_metadata={
3017-
"category": "recentlyAdded",
3018-
"batchNumber": 5,
3019-
"rating": 9.3,
3020-
"needsReview": True,
3021-
},
30222919
)
30232920

30242921
```
@@ -3043,15 +2940,7 @@ client.indexes.videos.update(
30432940
<dl>
30442941
<dd>
30452942

3046-
**video_id:** `str` — The unique identifier of the video to update.
3047-
3048-
</dd>
3049-
</dl>
3050-
3051-
<dl>
3052-
<dd>
3053-
3054-
**user_metadata:** `typing.Optional[UserMetadata]`
2943+
**video_id:** `str` — The unique identifier of the video to delete.
30552944

30562945
</dd>
30572946
</dl>
@@ -3071,7 +2960,7 @@ client.indexes.videos.update(
30712960
</dl>
30722961
</details>
30732962

3074-
<details><summary><code>client.indexes.videos.<a href="src/twelvelabs/indexes/videos/client.py">delete</a>(...)</code></summary>
2963+
<details><summary><code>client.indexes.videos.<a href="src/twelvelabs/indexes/videos/client.py">update</a>(...)</code></summary>
30752964
<dl>
30762965
<dd>
30772966

@@ -3083,7 +2972,7 @@ client.indexes.videos.update(
30832972
<dl>
30842973
<dd>
30852974

3086-
This method deletes all the information about the specified video. This action cannot be undone.
2975+
Use this method to update one or more fields of the metadata of a video. Also, you can delete a field by setting it to `null`.
30872976
</dd>
30882977
</dl>
30892978
</dd>
@@ -3103,9 +2992,15 @@ from twelvelabs import TwelveLabs
31032992
client = TwelveLabs(
31042993
api_key="YOUR_API_KEY",
31052994
)
3106-
client.indexes.videos.delete(
2995+
client.indexes.videos.update(
31072996
index_id="6298d673f1090f1100476d4c",
31082997
video_id="6298d673f1090f1100476d4c",
2998+
user_metadata={
2999+
"category": "recentlyAdded",
3000+
"batchNumber": 5,
3001+
"rating": 9.3,
3002+
"needsReview": True,
3003+
},
31093004
)
31103005

31113006
```
@@ -3130,7 +3025,15 @@ client.indexes.videos.delete(
31303025
<dl>
31313026
<dd>
31323027

3133-
**video_id:** `str` — The unique identifier of the video to delete.
3028+
**video_id:** `str` — The unique identifier of the video to update.
3029+
3030+
</dd>
3031+
</dl>
3032+
3033+
<dl>
3034+
<dd>
3035+
3036+
**user_metadata:** `typing.Optional[UserMetadata]`
31343037

31353038
</dd>
31363039
</dl>

src/twelvelabs/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
VideoVectorSystemMetadata,
7474
)
7575
from .errors import BadRequestError, NotFoundError, TooManyRequestsError
76-
from . import embed, indexes, manage_videos, search, tasks
76+
from . import embed, indexes, search, tasks
7777
from .client import AsyncTwelveLabs, TwelveLabs
7878
from .environment import TwelveLabsEnvironment
7979
from .indexes import IndexesCreateRequestModelsItem, IndexesCreateResponse, IndexesListResponse
@@ -186,7 +186,6 @@
186186
"__version__",
187187
"embed",
188188
"indexes",
189-
"manage_videos",
190189
"search",
191190
"tasks",
192191
]

0 commit comments

Comments
 (0)