docent-python 0.1.0a2__py3-none-any.whl → 0.1.0a3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- docent/data_models/__init__.py +0 -10
- docent/sdk/client.py +0 -48
- {docent_python-0.1.0a2.dist-info → docent_python-0.1.0a3.dist-info}/METADATA +1 -1
- {docent_python-0.1.0a2.dist-info → docent_python-0.1.0a3.dist-info}/RECORD +6 -6
- {docent_python-0.1.0a2.dist-info → docent_python-0.1.0a3.dist-info}/WHEEL +0 -0
- {docent_python-0.1.0a2.dist-info → docent_python-0.1.0a3.dist-info}/licenses/LICENSE.md +0 -0
docent/data_models/__init__.py
CHANGED
@@ -3,22 +3,12 @@ from docent.data_models.citation import Citation
|
|
3
3
|
from docent.data_models.metadata import BaseAgentRunMetadata, BaseMetadata, FrameDimension
|
4
4
|
from docent.data_models.regex import RegexSnippet
|
5
5
|
from docent.data_models.transcript import Transcript
|
6
|
-
from docent_core._db_service.filters import (
|
7
|
-
AgentRunIdFilter,
|
8
|
-
BaseFrameFilter,
|
9
|
-
ComplexFilter,
|
10
|
-
SearchResultPredicateFilter,
|
11
|
-
)
|
12
6
|
|
13
7
|
__all__ = [
|
14
8
|
"AgentRun",
|
15
9
|
"Citation",
|
16
10
|
"RegexSnippet",
|
17
|
-
"AgentRunIdFilter",
|
18
11
|
"FrameDimension",
|
19
|
-
"BaseFrameFilter",
|
20
|
-
"SearchResultPredicateFilter",
|
21
|
-
"ComplexFilter",
|
22
12
|
"BaseAgentRunMetadata",
|
23
13
|
"BaseMetadata",
|
24
14
|
"Transcript",
|
docent/sdk/client.py
CHANGED
@@ -5,7 +5,6 @@ import requests
|
|
5
5
|
|
6
6
|
from docent._log_util.logger import get_logger
|
7
7
|
from docent.data_models.agent_run import AgentRun
|
8
|
-
from docent_core._db_service.filters import FrameFilter
|
9
8
|
|
10
9
|
logger = get_logger(__name__)
|
11
10
|
|
@@ -181,53 +180,6 @@ class Docent:
|
|
181
180
|
logger.info(f"Successfully added {total_runs} agent runs to FrameGrid '{fg_id}'")
|
182
181
|
return {"status": "success", "total_runs_added": total_runs}
|
183
182
|
|
184
|
-
def get_base_filter(self, fg_id: str) -> dict[str, Any] | None:
|
185
|
-
"""Retrieves the base filter for a FrameGrid.
|
186
|
-
|
187
|
-
The base filter defines default filtering applied to all views.
|
188
|
-
|
189
|
-
Args:
|
190
|
-
fg_id: ID of the FrameGrid.
|
191
|
-
|
192
|
-
Returns:
|
193
|
-
dict or None: Filter data if a filter exists, None otherwise.
|
194
|
-
|
195
|
-
Raises:
|
196
|
-
requests.exceptions.HTTPError: If the API request fails.
|
197
|
-
"""
|
198
|
-
url = f"{self._server_url}/{fg_id}/base_filter"
|
199
|
-
response = self._session.get(url)
|
200
|
-
response.raise_for_status()
|
201
|
-
# The endpoint returns the filter model directly or null
|
202
|
-
filter_data = response.json()
|
203
|
-
return filter_data
|
204
|
-
|
205
|
-
def set_base_filter(self, fg_id: str, filter: FrameFilter | None) -> dict[str, Any]:
|
206
|
-
"""Sets the base filter for a FrameGrid.
|
207
|
-
|
208
|
-
The base filter defines default filtering applied to all views.
|
209
|
-
|
210
|
-
Args:
|
211
|
-
fg_id: ID of the FrameGrid.
|
212
|
-
filter: FrameFilter object defining the filter, or None to clear the filter.
|
213
|
-
|
214
|
-
Returns:
|
215
|
-
dict: API response data.
|
216
|
-
|
217
|
-
Raises:
|
218
|
-
requests.exceptions.HTTPError: If the API request fails.
|
219
|
-
"""
|
220
|
-
url = f"{self._server_url}/{fg_id}/base_filter"
|
221
|
-
payload = {
|
222
|
-
"filter": filter.model_dump() if filter else None,
|
223
|
-
}
|
224
|
-
|
225
|
-
response = self._session.post(url, json=payload)
|
226
|
-
response.raise_for_status()
|
227
|
-
|
228
|
-
logger.info(f"Successfully set base filter for FrameGrid '{fg_id}'")
|
229
|
-
return response.json()
|
230
|
-
|
231
183
|
def list_framegrids(self) -> list[dict[str, Any]]:
|
232
184
|
"""Lists all available FrameGrids.
|
233
185
|
|
@@ -2,7 +2,7 @@ docent/__init__.py,sha256=J2BbO6rzilfw9WXRUeolr439EGFezqbMU_kCpCCryRA,59
|
|
2
2
|
docent/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
docent/_log_util/__init__.py,sha256=3HXXrxrSm8PxwG4llotrCnSnp7GuroK1FNHsdg6f7aE,73
|
4
4
|
docent/_log_util/logger.py,sha256=kwM0yRW1IJd6-XTorjWn48B4l8qvD2ZM6VDjY5eskQI,4422
|
5
|
-
docent/data_models/__init__.py,sha256=
|
5
|
+
docent/data_models/__init__.py,sha256=SbXBXpI2HLI2qeGoKD-6Qp0gY3igQAw6qOsolc_rj7Q,448
|
6
6
|
docent/data_models/_tiktoken_util.py,sha256=hC0EDDWItv5-0cONBnHWgZtQOflDU7ZNEhXPFo4DvPc,3057
|
7
7
|
docent/data_models/agent_run.py,sha256=sdvoUUpOhQAHqJHNR5KoHthCXrpJajdIREMacoR1ODk,9516
|
8
8
|
docent/data_models/citation.py,sha256=WsVQZcBT2EJD24ysyeVOC5Xfo165RI7P5_cOnJBgHj0,10015
|
@@ -15,8 +15,8 @@ docent/data_models/chat/content.py,sha256=Co-jO8frQa_DSP11wJuhPX0s-GpJk8yqtKqPei
|
|
15
15
|
docent/data_models/chat/message.py,sha256=iAo38kbV6wYbFh8S23cxLy6HY4C_i3PzQ6RpSQG5dxM,3861
|
16
16
|
docent/data_models/chat/tool.py,sha256=x7NKINswPe0Kqvcx4ubjHzB-n0-i4DbFodvaBb2vitk,3042
|
17
17
|
docent/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
-
docent/sdk/client.py,sha256=
|
19
|
-
docent_python-0.1.
|
20
|
-
docent_python-0.1.
|
21
|
-
docent_python-0.1.
|
22
|
-
docent_python-0.1.
|
18
|
+
docent/sdk/client.py,sha256=J6xd100KWym-jOrXjaEyagi85ddklymF9QEOJmYxJP8,8588
|
19
|
+
docent_python-0.1.0a3.dist-info/METADATA,sha256=v_-KmR9urNIEdjduRZ_wzZXpplPvImgT--y_QKgGHAI,493
|
20
|
+
docent_python-0.1.0a3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
21
|
+
docent_python-0.1.0a3.dist-info/licenses/LICENSE.md,sha256=vOHzq3K4Ndu0UV9hPrtXvlD7pHOjyDQmGjHuLSIkRQY,1087
|
22
|
+
docent_python-0.1.0a3.dist-info/RECORD,,
|
File without changes
|
File without changes
|