Skip to content

Commit 596b1e7

Browse files
committed
feat: add index config
1 parent 034e2a6 commit 596b1e7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

videodb/rtstream.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ def __init__(
1111
self._connection = _connection
1212
self.rtstream_index_id = rtstream_index_id
1313
self.rtstream_id = rtstream_id
14+
self.extraction_type = kwargs.get("extraction_type", None)
15+
self.extraction_config = kwargs.get("extraction_config", None)
16+
self.prompt = kwargs.get("prompt", None)
1417
self.name = kwargs.get("name", None)
1518
self.status = kwargs.get("status", None)
1619

@@ -19,6 +22,9 @@ def __repr__(self) -> str:
1922
f"RTStreamSceneIndex("
2023
f"rtstream_index_id={self.rtstream_index_id}, "
2124
f"rtstream_id={self.rtstream_id}, "
25+
f"extraction_type={self.extraction_type}, "
26+
f"extraction_config={self.extraction_config}, "
27+
f"prompt={self.prompt}, "
2228
f"name={self.name}, "
2329
f"status={self.status})"
2430
)
@@ -132,6 +138,9 @@ def index_scenes(
132138
_connection=self._connection,
133139
rtstream_index_id=index_data.get("rtstream_index_id"),
134140
rtstream_id=self.id,
141+
extraction_type=index_data.get("extraction_type"),
142+
extraction_config=index_data.get("extraction_config"),
143+
prompt=index_data.get("prompt"),
135144
name=index_data.get("name"),
136145
status=index_data.get("status"),
137146
)
@@ -145,6 +154,9 @@ def list_scene_indexes(self):
145154
_connection=self._connection,
146155
rtstream_index_id=index.get("rtstream_index_id"),
147156
rtstream_id=self.id,
157+
extraction_type=index.get("extraction_type"),
158+
extraction_config=index.get("extraction_config"),
159+
prompt=index.get("prompt"),
148160
name=index.get("name"),
149161
status=index.get("status"),
150162
)
@@ -159,6 +171,9 @@ def get_rtstream_scene_index(self, index_id: str) -> RTStreamSceneIndex:
159171
_connection=self._connection,
160172
rtstream_index_id=index_data.get("rtstream_index_id"),
161173
rtstream_id=self.id,
174+
extraction_type=index_data.get("extraction_type"),
175+
extraction_config=index_data.get("extraction_config"),
176+
prompt=index_data.get("prompt"),
162177
name=index_data.get("name"),
163178
status=index_data.get("status"),
164179
)

0 commit comments

Comments
 (0)