docent-python 0.1.23a0__tar.gz → 0.1.24a0__tar.gz
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.
Potentially problematic release.
This version of docent-python might be problematic. Click here for more details.
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/PKG-INFO +1 -1
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/sdk/client.py +18 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/trace.py +35 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/pyproject.toml +1 -1
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/.gitignore +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/LICENSE.md +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/README.md +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/__init__.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/__init__.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/data_models/__init__.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/data_models/exceptions.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/data_models/llm_output.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/llm_cache.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/llm_svc.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/model_registry.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/providers/__init__.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/providers/anthropic.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/providers/common.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/providers/google.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/providers/openai.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/providers/openrouter.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/providers/preference_types.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/providers/provider_registry.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_log_util/__init__.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_log_util/logger.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/__init__.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/_tiktoken_util.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/agent_run.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/chat/__init__.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/chat/content.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/chat/message.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/chat/tool.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/citation.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/judge.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/metadata_util.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/regex.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/remove_invalid_citation_ranges.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/shared_types.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/transcript.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/data_models/util.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/judges/__init__.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/judges/analysis.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/judges/impl.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/judges/runner.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/judges/stats.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/judges/types.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/judges/util/forgiving_json.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/judges/util/meta_schema.json +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/judges/util/meta_schema.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/judges/util/parse_output.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/judges/util/voting.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/loaders/load_inspect.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/py.typed +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/samples/__init__.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/samples/load.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/samples/log.eval +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/samples/tb_airline.json +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/sdk/__init__.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/sdk/agent_run_writer.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/trace_temp.py +0 -0
- {docent_python-0.1.23a0 → docent_python-0.1.24a0}/uv.lock +0 -0
|
@@ -391,6 +391,24 @@ class Docent:
|
|
|
391
391
|
# TODO(mengk): kinda hacky
|
|
392
392
|
return AgentRun.model_validate(response.json())
|
|
393
393
|
|
|
394
|
+
def get_chat_sessions(self, collection_id: str, agent_run_id: str) -> list[dict[str, Any]]:
|
|
395
|
+
"""Get all chat sessions for an agent run, excluding judge result sessions.
|
|
396
|
+
|
|
397
|
+
Args:
|
|
398
|
+
collection_id: ID of the Collection.
|
|
399
|
+
agent_run_id: The ID of the agent run to retrieve chat sessions for.
|
|
400
|
+
|
|
401
|
+
Returns:
|
|
402
|
+
list: List of chat session dictionaries.
|
|
403
|
+
|
|
404
|
+
Raises:
|
|
405
|
+
requests.exceptions.HTTPError: If the API request fails.
|
|
406
|
+
"""
|
|
407
|
+
url = f"{self._server_url}/chat/{collection_id}/{agent_run_id}/sessions"
|
|
408
|
+
response = self._session.get(url)
|
|
409
|
+
self._handle_response_errors(response)
|
|
410
|
+
return response.json()
|
|
411
|
+
|
|
394
412
|
def make_collection_public(self, collection_id: str) -> dict[str, Any]:
|
|
395
413
|
"""Make a collection publicly accessible to anyone with the link.
|
|
396
414
|
|
|
@@ -1270,6 +1270,41 @@ def transcript_metadata(
|
|
|
1270
1270
|
logger.error(f"Failed to send transcript metadata: {e}")
|
|
1271
1271
|
|
|
1272
1272
|
|
|
1273
|
+
def transcript_group_metadata(
|
|
1274
|
+
name: Optional[str] = None,
|
|
1275
|
+
description: Optional[str] = None,
|
|
1276
|
+
parent_transcript_group_id: Optional[str] = None,
|
|
1277
|
+
metadata: Optional[Dict[str, Any]] = None,
|
|
1278
|
+
) -> None:
|
|
1279
|
+
"""
|
|
1280
|
+
Send transcript group metadata directly to the backend for the current transcript group.
|
|
1281
|
+
|
|
1282
|
+
Args:
|
|
1283
|
+
name: Optional transcript group name
|
|
1284
|
+
description: Optional transcript group description
|
|
1285
|
+
parent_transcript_group_id: Optional parent transcript group ID
|
|
1286
|
+
metadata: Optional metadata to send
|
|
1287
|
+
|
|
1288
|
+
Example:
|
|
1289
|
+
transcript_group_metadata(name="pipeline", description="Main processing pipeline")
|
|
1290
|
+
transcript_group_metadata(metadata={"team": "search", "env": "prod"})
|
|
1291
|
+
"""
|
|
1292
|
+
try:
|
|
1293
|
+
tracer = get_tracer()
|
|
1294
|
+
if tracer.is_disabled():
|
|
1295
|
+
return
|
|
1296
|
+
transcript_group_id = tracer.get_current_transcript_group_id()
|
|
1297
|
+
if not transcript_group_id:
|
|
1298
|
+
logger.warning("No active transcript group context. Metadata will not be sent.")
|
|
1299
|
+
return
|
|
1300
|
+
|
|
1301
|
+
tracer.send_transcript_group_metadata(
|
|
1302
|
+
transcript_group_id, name, description, parent_transcript_group_id, metadata
|
|
1303
|
+
)
|
|
1304
|
+
except Exception as e:
|
|
1305
|
+
logger.error(f"Failed to send transcript group metadata: {e}")
|
|
1306
|
+
|
|
1307
|
+
|
|
1273
1308
|
class AgentRunContext:
|
|
1274
1309
|
"""Context manager that works in both sync and async contexts."""
|
|
1275
1310
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/data_models/exceptions.py
RENAMED
|
File without changes
|
{docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/data_models/llm_output.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/providers/preference_types.py
RENAMED
|
File without changes
|
{docent_python-0.1.23a0 → docent_python-0.1.24a0}/docent/_llm_util/providers/provider_registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|