docent-python 0.1.37a0__tar.gz → 0.1.38a0__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.
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/PKG-INFO +1 -1
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/trace.py +5 -16
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/pyproject.toml +1 -1
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/.gitignore +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/LICENSE.md +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/README.md +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/__init__.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/__init__.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/data_models/__init__.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/data_models/exceptions.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/data_models/llm_output.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/llm_cache.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/llm_svc.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/model_registry.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/providers/__init__.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/providers/anthropic.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/providers/common.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/providers/google.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/providers/openai.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/providers/openrouter.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/providers/preference_types.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/providers/provider_registry.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_log_util/__init__.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_log_util/logger.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/__init__.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/_tiktoken_util.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/agent_run.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/chat/__init__.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/chat/content.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/chat/message.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/chat/tool.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/citation.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/collection.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/formatted_objects.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/judge.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/metadata_util.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/regex.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/transcript.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/data_models/util.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/judges/__init__.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/judges/analysis.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/judges/impl.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/judges/runner.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/judges/stats.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/judges/types.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/judges/util/forgiving_json.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/judges/util/meta_schema.json +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/judges/util/meta_schema.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/judges/util/parse_output.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/judges/util/voting.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/loaders/load_inspect.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/py.typed +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/samples/__init__.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/samples/load.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/samples/log.eval +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/samples/tb_airline.json +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/sdk/__init__.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/sdk/agent_run_writer.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/sdk/client.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/sdk/llm_context.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/trace_temp.py +0 -0
- {docent_python-0.1.37a0 → docent_python-0.1.38a0}/uv.lock +0 -0
|
@@ -364,10 +364,11 @@ class DocentTracer:
|
|
|
364
364
|
|
|
365
365
|
event_attributes: Dict[str, Any] = dict(event.get("attributes", {}))
|
|
366
366
|
metadata_payload = cast(Optional[Dict[str, Any]], event.get("metadata"))
|
|
367
|
-
if metadata_payload:
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
367
|
+
if metadata_payload is not None:
|
|
368
|
+
try:
|
|
369
|
+
event_attributes["metadata_json"] = json.dumps(metadata_payload)
|
|
370
|
+
except (TypeError, ValueError) as exc:
|
|
371
|
+
logger.warning("Failed to serialize metadata payload for span event: %s", exc)
|
|
371
372
|
|
|
372
373
|
timestamp_ns = event.get("timestamp_ns")
|
|
373
374
|
span.add_event(
|
|
@@ -2042,18 +2043,6 @@ def agent_run_score(name: str, score: float, attributes: Optional[Dict[str, Any]
|
|
|
2042
2043
|
logger.error(f"Failed to send score: {e}")
|
|
2043
2044
|
|
|
2044
2045
|
|
|
2045
|
-
def _flatten_dict(d: Dict[str, Any], prefix: str = "") -> Dict[str, Any]:
|
|
2046
|
-
"""Flatten nested dictionary with dot notation."""
|
|
2047
|
-
flattened: Dict[str, Any] = {}
|
|
2048
|
-
for key, value in d.items():
|
|
2049
|
-
new_key = f"{prefix}.{key}" if prefix else key
|
|
2050
|
-
if isinstance(value, dict):
|
|
2051
|
-
flattened.update(_flatten_dict(dict(value), new_key)) # type: ignore
|
|
2052
|
-
else:
|
|
2053
|
-
flattened[new_key] = value
|
|
2054
|
-
return flattened
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
2046
|
def agent_run_metadata(metadata: Dict[str, Any]) -> None:
|
|
2058
2047
|
"""
|
|
2059
2048
|
Send metadata directly to the backend for the current agent run.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{docent_python-0.1.37a0 → docent_python-0.1.38a0}/docent/_llm_util/data_models/exceptions.py
RENAMED
|
File without changes
|
{docent_python-0.1.37a0 → docent_python-0.1.38a0}/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.37a0 → docent_python-0.1.38a0}/docent/_llm_util/providers/preference_types.py
RENAMED
|
File without changes
|
{docent_python-0.1.37a0 → docent_python-0.1.38a0}/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
|
|
File without changes
|
|
File without changes
|